replace all package.json scripts with the justfile.

This commit is contained in:
fiatjaf
2024-02-16 22:32:43 -03:00
parent f121fe5981
commit 47b3e5863d
2 changed files with 12 additions and 15 deletions

View File

@@ -1,7 +1,17 @@
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:
wrangler pages publish --project-name metadata-contacts-relays dist/
lint:
eslint src/ --ext .js,.jsx,.ts,.tsx
build-and-deploy: build deploy
serve:
fd '.ts|.html|.css' | entr -r bash -c 'just build && python -m http.server -d dist/ 8080'

View File

@@ -1,19 +1,6 @@
{
"name": "nostr-profile-manager",
"version": "1.0.0",
"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"
},
"private": true,
"devDependencies": {
"@types/jest": "^29.4.0",
"@typescript-eslint/eslint-plugin": "^5.54.0",