mirror of
https://github.com/aljazceru/nostr-profile-manager.git
synced 2025-12-18 14:14:19 +01:00
replace all package.json scripts with the justfile.
This commit is contained in:
12
justfile
12
justfile
@@ -1,7 +1,17 @@
|
|||||||
build:
|
build:
|
||||||
yarn run build
|
rm -rf dist
|
||||||
|
esbuild src/index.ts --bundle --minify --sourcemap=external --outfile=dist/index.js
|
||||||
|
./node_modules/.bin/sass src/style.scss dist/style.css --style compressed
|
||||||
|
cp src/index.html dist/index.html
|
||||||
|
cp -r src/img dist/img
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
wrangler pages publish --project-name metadata-contacts-relays dist/
|
wrangler pages publish --project-name metadata-contacts-relays dist/
|
||||||
|
|
||||||
|
lint:
|
||||||
|
eslint src/ --ext .js,.jsx,.ts,.tsx
|
||||||
|
|
||||||
build-and-deploy: build deploy
|
build-and-deploy: build deploy
|
||||||
|
|
||||||
|
serve:
|
||||||
|
fd '.ts|.html|.css' | entr -r bash -c 'just build && python -m http.server -d dist/ 8080'
|
||||||
|
|||||||
15
package.json
15
package.json
@@ -1,19 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nostr-profile-manager",
|
"name": "nostr-profile-manager",
|
||||||
"version": "1.0.0",
|
"private": true,
|
||||||
"main": "index.ts",
|
|
||||||
"author": "= <=>",
|
|
||||||
"license": "MIT",
|
|
||||||
"scripts": {
|
|
||||||
"lint": "eslint src/ --ext .js,.jsx,.ts,.tsx",
|
|
||||||
"build-js": "esbuild src/index.ts --bundle --minify --sourcemap=external --outfile=dist/index.js",
|
|
||||||
"build-css": "yarn sass src/style.scss dist/style.css --style compressed",
|
|
||||||
"build-html": "cp src/index.html dist/index.html",
|
|
||||||
"build": "rm -rf dist && yarn build-js && yarn build-css && yarn build-html && cp -r src/img dist/img",
|
|
||||||
"test": "yarn jest",
|
|
||||||
"serve": "rm -rf dist && yarn build-css && yarn build-html && cp -r src/img dist/img && yarn build-js --servedir=dist",
|
|
||||||
"watch": "rm -rf dist && yarn build-css && yarn build-html && cp -r src/img dist/img && yarn build-js --servedir=dist --watch"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.4.0",
|
"@types/jest": "^29.4.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user