|
13 | 13 | "scripts": { |
14 | 14 | "start": "npm run dev-node", |
15 | 15 |
|
16 | | - "build-dev-cjs": "npm run removedir public && tsc -p tsconfig-devcjs.json", |
17 | | - "build-dev-esm": "npm run removedir public && tsc -p tsconfig-devesm.json", |
18 | | - "dev-node": "nodemon -e js,ts --watch src --watch test --exec \"npm run build-dev-cjs && node public/test/server.js\"", |
19 | | - "dev-ts-node": "nodemon -e js,ts --watch src --watch test --exec \"npm run build-dev-cjs && ts-node public/test/server.js\"", |
20 | | - "dev-bun": "nodemon -e js,ts --watch src --watch test --exec \"bun run test/server.ts\"", |
| 16 | + "build-dev-cjs": "tsc -p tsconfig-devcjs.json", |
| 17 | + "build-dev-esm": "tsc -p tsconfig-devesm.json", |
| 18 | + "dev-node": "nodemon -e js,ts --watch src --watch test --exec \"npm run build-dev-cjs && node public/cjs/test/server-node.js\"", |
| 19 | + "dev-ts-node": "nodemon -e js,ts --watch src --watch test --exec \"npm run build-dev-cjs && ts-node public/cjs/test/server-node.js\"", |
| 20 | + "dev-bun": "nodemon -e js,ts --watch src --watch test --exec \"bun run test/server-node.ts\"", |
21 | 21 | "dev-deno": "nodemon -e js,ts --watch src --watch test --exec \"deno run --allow-read --allow-write test/test-deno/server-deno.ts\"", |
22 | | - "dev-cf": "nodemon -e js,ts,html --watch src --watch test --exec \"npm run build-dev-esm && wrangler dev\"", |
| 22 | + "dev-cf": "nodemon -e js,ts,html --watch src --watch test --exec \"wrangler dev\"", |
23 | 23 | "dev-browser": "nodemon -e js,ts,html --watch src --watch test --exec \"npm run build-dev-esm && tsc -p tsconfig-umd.json && rollup -c public/config/rollup.config.dev.js && ts-node test/server-browser.ts\"", |
24 | 24 |
|
25 | 25 | "removedir": "node -e \"var fs = require('fs'); try{process.argv.slice(1).map((fpath) => fs.rmdirSync(fpath, { recursive: true }))}catch(err){console.log(`Dist not found`)}; process.exit(0);\"", |
26 | 26 | "build-all":"tsc -p tsconfig-mjs.json && tsc -p tsconfig-cjs.json && tsc -p tsconfig-umd.json && rollup -c public/config/rollup.config.umd.js && echo {\"type\": \"commonjs\"}>dist\\cjs\\package.json && echo {\"type\": \"module\"}>dist\\mjs\\package.json", |
27 | 27 | "build":"npm run removedir dist && npm run build-all", |
| 28 | + |
| 29 | + "backup": "node -e \"var fs = require('fs'); try{fs.copyFileSync('package.json', 'package-backup.json')}catch(err){console.log(`Copy failed`)}; process.exit(0);\"", |
| 30 | + "restore": "node -e \"var fs = require('fs'); try{fs.copyFileSync('package-backup.json', 'package.json')}catch(err){console.log(`Copy failed`)}; process.exit(0);\"", |
| 31 | + "prepublish":"npm run backup && npm pkg delete devDependencies", |
| 32 | + "postpublish":"npm run restore", |
28 | 33 |
|
29 | 34 | "gh-deploy-init": "git push origin && git subtree push --prefix docs origin gh-pages", |
30 | 35 | "gh-deploy": "git push origin :gh-pages && git subtree push --prefix docs origin gh-pages", |
31 | 36 | "typedoc": "npm run removedir docs && typedoc src/kv-storage.ts src/kv-storage-module.ts", |
32 | 37 | "gh-deploydoc": "npm run typedoc && git add docs -f && git commit -m \"docs\" && npm run gh-deploy && git reset --soft HEAD~ && git restore --staged .", |
33 | 38 |
|
34 | | - "test": "npm run dev-node" |
| 39 | + "test-all": "nodemon -e js,ts --watch src --watch test --exec \"npm run build-dev-cjs && node public/cjs/test/test-all.js\"", |
| 40 | + "test": "npm run test-all" |
35 | 41 | }, |
36 | 42 | "files": [ |
37 | 43 | "dist/", |
|
0 commit comments