Skip to content
Open

Bun #40

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v3
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 20
cache: 'npm'
bun-version: latest
- name: Install dependencies
run: npm install
run: bun install
- name: Build Tree.js Library
run: npm run build:lib
run: bun run build:lib
- name: Build Tree.js App
run: npm run build:app
run: bun run build:app
- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Use an official Node runtime as the base image
FROM node:18
# Use an official Bun runtime as the base image
FROM oven/bun:latest

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy package.json and package-lock.json
COPY package*.json ./
# Copy package.json and bun.lockb (or bun.lock)
COPY package.json bun.lock* ./

# Install dependencies
RUN npm install
RUN bun install

# Copy the rest of the application code
COPY . .

# Build the Tree.js app
RUN npm run build:app
RUN bun run build

# Install a simple HTTP server for serving static content
RUN npm install -g http-server
RUN bun add -g http-server

# Make port 8080 available to the world outside this container
EXPOSE 8080

# Run the app when the container launches
CMD ["http-server", "dist"]
CMD ["http-server", "dist"]
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ https://eztree.dev

# Installation

```js
npm i @dgreenheck/ez-tree
```bash
bun add @dgreenheck/ez-tree
```

# Usage
Expand All @@ -45,8 +45,8 @@ Any time the tree parameters are changed, you must call `generate()` to regenera
To run the standalone app locally, you first need to build the EZ-Tree library before running the app.

```bash
npm install
npm run app
bun install
bun run app
```

# Running App with Docker
Expand Down
351 changes: 351 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ services:
- ./public:/usr/src/app/public
environment:
- NODE_ENV=development
command: npm run app -- --host 0.0.0.0
command: bun run app -- --host 0.0.0.0
Loading