mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
replace package.json scripts with just.
This commit is contained in:
6
.github/workflows/npm-publish.yml
vendored
6
.github/workflows/npm-publish.yml
vendored
@@ -12,9 +12,9 @@ jobs:
|
|||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
- run: yarn --ignore-engines
|
- uses: extractions/setup-just@v1
|
||||||
- run: node build.js
|
- run: just install-and-build
|
||||||
- run: yarn test
|
- run: just test
|
||||||
- uses: JS-DevTools/npm-publish@v1
|
- uses: JS-DevTools/npm-publish@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.NPM_TOKEN }}
|
token: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|||||||
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@@ -11,6 +11,6 @@ jobs:
|
|||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
- run: yarn --ignore-engines
|
- uses: extractions/setup-just@v1
|
||||||
- run: node build.js
|
- run: just install-and-build
|
||||||
- run: yarn test
|
- run: just test
|
||||||
|
|||||||
19
justfile
Normal file
19
justfile
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
export PATH := "./node_modules/.bin:" + env_var('PATH')
|
||||||
|
|
||||||
|
install-dependencies:
|
||||||
|
yarn --ignore-engines
|
||||||
|
|
||||||
|
deps-installed := `ls node_modules`
|
||||||
|
|
||||||
|
install-and-build:
|
||||||
|
if deps-installed != "node_modules" { install-dependencies }
|
||||||
|
build
|
||||||
|
|
||||||
|
build:
|
||||||
|
node build.js
|
||||||
|
|
||||||
|
test: build
|
||||||
|
jest
|
||||||
|
|
||||||
|
testOnly file: build
|
||||||
|
jest {{file}}
|
||||||
@@ -38,10 +38,5 @@
|
|||||||
"tsd": "^0.22.0",
|
"tsd": "^0.22.0",
|
||||||
"typescript": "^4.9.4",
|
"typescript": "^4.9.4",
|
||||||
"websocket-polyfill": "^0.0.3"
|
"websocket-polyfill": "^0.0.3"
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"build": "node build.js",
|
|
||||||
"pretest": "node build.js",
|
|
||||||
"test": "jest"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user