Skip to content

Commit

Permalink
replace all package.json scripts with the justfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Feb 17, 2024
1 parent f121fe5 commit 47b3e58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
12 changes: 11 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
@@ -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'
15 changes: 1 addition & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 47b3e58

Please sign in to comment.