Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW] 14 better scripts lul #2204

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
],
"scripts": {
"serve-static": "live-server --open=demo --watch=build/o_spreadsheet.js,build/o_spreadsheet.xml,demo",
"dev": "npm-run-all build --parallel server serve-static watch:*",
"dev": "npm-run-all --print-label build --parallel server serve-static watch:*",
"server": "node tools/server/main.js",
"build:js": "tsc --module es6 --incremental",
"bundle:js": "rollup -c -m --configDev",
"bundle:xml": "node tools/bundle_xml/main.js",
"build": "npm-run-all build:js bundle:js \"bundle:xml -- --outDir build\"",
"build:bundleJs": "rollup -c -m --configDev",
"build:bundleXml": "node tools/bundle_xml/main.js",
"build": "npm-run-all build:js build:bundleJs \"build:bundleXml -- --outDir build\"",
"doc": "typedoc",
"precommit": "npm run prettier && npm run doc",
"test": "jest",
"test:watch": "jest --watch",
"prettier": "prettier . --write",
"check-formatting": "prettier . --check",
"dist": "tsc --module es6 --declaration --declarationDir dist/types && rollup -c && npm run bundle:xml -- --outDir dist",
"dist": "tsc --module es6 --declaration --declarationDir dist/types && rollup -c && npm run build:bundleXml -- --outDir dist",
"prepare": "husky install",
"watch:bundle": "npm run bundle:js -- --watch",
"watch:bundle": "npm run build:bundleJs -- --watch",
"watch:ts": "npm run build:js -- --watch",
"watch:xml": "node tools/bundle_xml/watch_xml_templates.js",
"unzipXlsx": "node tools/bundle_xlsx/unzip_xlsx_demo.js",
Expand Down
6 changes: 3 additions & 3 deletions tools/server/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ if (fs.existsSync(currentSessionFile)) {
}

// save the messages before exiting gracefully
[`exit`, `SIGINT`, `SIGUSR1`, `SIGUSR2`, `SIGTERM`].forEach((eventType) => {
process.on(eventType, () => {
[`SIGINT`, `SIGUSR1`, `SIGUSR2`, `SIGTERM`].forEach((eventType) => {
process.on(eventType, (code) => {
log(`writing ${messages.length} messages to ${currentSessionFile}`);
fs.writeFileSync(currentSessionFile, JSON.stringify(messages));
process.exit();
process.exit(code);
});
});

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"strictNullChecks": true,
"esModuleInterop": true,
"allowJs": true,
"preserveWatchOutput": true,
"sourceMap": true
},
"include": ["src"],
Expand Down