Skip to content

Commit

Permalink
Use Bun to build
Browse files Browse the repository at this point in the history
  • Loading branch information
mupperton committed Nov 22, 2023
1 parent 88c132c commit 672ba25
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 12,405 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/npm-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
- name: Setup NPM
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- name: Clean install dependencies and build
run: |
npm ci
npm run build
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: '1.0.13'

- name: Bun install
run: bun install

- name: Build
run: bun run build

- name: Publish alpha
if: github.event.release.prerelease && endsWith(github.event.release.tag_name, '-alpha')
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Icon[\r]
# Build artefacts
node_modules
dist
.parcel-cache
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

8 changes: 0 additions & 8 deletions .parcelrc

This file was deleted.

5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@
**Importing**

```js
// esm
// Only ESM is supported
import { Phunk } from 'phunky'

// cjs
const { Phunk } = require('phunky')
```

**Example usage**
Expand Down
10 changes: 0 additions & 10 deletions babel.config.js

This file was deleted.

10 changes: 10 additions & 0 deletions build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import dts from 'bun-plugin-dts'

await Bun.build({
entrypoints: ['./src/index.ts'],
outdir: './dist',
target: 'node',
plugins: [
dts({ output: { noBanner: true } }),
],
})
Binary file added bun.lockb
Binary file not shown.
Loading

0 comments on commit 672ba25

Please sign in to comment.