Skip to content

Commit

Permalink
test rewriting build/publish
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbrowne committed Feb 14, 2022
1 parent 905d450 commit 177b31d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ parser:
@npx jison src/parser.jison -o src/parser.js -m commonjs

dist:
@mkdir -p dist/cjs dist/esm
@npx babel --delete-dir-on-start --copy-files --out-dir dist/cjs src
@npx babel --delete-dir-on-start --copy-files --env-name esm --out-dir dist/esm src
@npm run build

test:
@npx jest
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"module": "dist/esm/index.js",
"scripts": {
"test": "jest",
"lint": "standard"
"lint": "standard",
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "babel --delete-dir-on-start --copy-files --out-dir dist/cjs src",
"build:esm": "babel --delete-dir-on-start --copy-files --env-name esm --out-dir dist/esm src"
},
"files": [
"dist"
Expand Down

0 comments on commit 177b31d

Please sign in to comment.