Browse Source

add run-script-os dev dependency

- adjust script to include windows specific commands
pull/2410/head
Kevin Lien 2 years ago
parent
commit
f80aa3360a
  1. 43
      apps/client/project.json
  2. 13
      package.json
  3. 5
      yarn.lock

43
apps/client/project.json

@ -141,6 +141,49 @@
]
}
},
"copy-assets-windows": {
"executor": "nx:run-commands",
"options": {
"commands": [
{
"command": "mkdir dist\\apps\\client"
},
{
"command": "xcopy /E /I apps\\client\\src\\assets dist\\apps\\client"
},
{
"command": "xcopy /E /I apps\\client\\src\\assets\\.well-known dist\\apps\\client"
},
{
"command": "copy apps\\client\\src\\assets\\favicon.ico dist\\apps\\client"
},
{
"command": "copy apps\\client\\src\\assets\\index.html dist\\apps\\client"
},
{
"command": "copy apps\\client\\src\\assets\\robots.txt dist\\apps\\client"
},
{
"command": "copy apps\\client\\src\\assets\\site.webmanifest dist\\apps\\client"
},
{
"command": "copy node_modules\\ionicons\\dist\\index.js dist\\apps\\client"
},
{
"command": "copy node_modules\\ionicons\\dist\\ionicons.js dist\\apps\\client"
},
{
"command": "xcopy /E /I /Y node_modules\\ionicons\\dist\\ionicons dist\\apps\\client\\ionicons"
},
{
"command": "copy CHANGELOG.md dist\\apps\\client\\assets"
},
{
"command": "copy LICENSE dist\\apps\\client\\assets"
}
]
}
},
"serve": {
"executor": "@nx/angular:webpack-dev-server",
"options": {

13
package.json

@ -14,8 +14,12 @@
"affected:lint": "nx affected:lint",
"affected:test": "nx affected:test",
"angular": "node --max_old_space_size=32768 ./node_modules/@angular/cli/bin/ng",
"build:dev": "nx run api:build && nx run client:build && nx run client:copy-assets && yarn replace-placeholders-in-build",
"build:production": "nx run api:build:production && nx run client:build:production && nx run client:copy-assets && yarn replace-placeholders-in-build",
"build:dev": "run-script-os",
"build:dev:windows": "nx run api:build && nx run client:build && nx run client:copy-assets-windows && yarn replace-placeholders-in-build",
"build:dev:default": "nx run api:build && nx run client:build && nx run client:copy-assets && yarn replace-placeholders-in-build",
"build:production": "run-script-os",
"build:production:windows": "nx run api:build:production && nx run client:build:production && nx run client:copy-assets-windows && yarn replace-placeholders-in-build",
"build:production:default": "nx run api:build:production && nx run client:build:production && nx run client:copy-assets && yarn replace-placeholders-in-build",
"build:storybook": "nx run ui:build-storybook",
"database:format-schema": "prisma format",
"database:generate-typings": "prisma generate",
@ -40,7 +44,9 @@
"postinstall": "prisma generate",
"replace-placeholders-in-build": "node ./replace.build.js",
"start": "node dist/apps/api/main",
"start:client": "nx run client:copy-assets && nx run client:serve --configuration=development-en --hmr -o",
"start:client": "run-script-os",
"start:client:windows": "nx run client:copy-assets-windows && nx run client:serve --configuration=development-en --hmr -o",
"start:client:default": "nx run client:copy-assets && nx run client:serve --configuration=development-en --hmr -o",
"start:production": "yarn database:migrate && yarn database:seed && node main",
"start:server": "nx run api:serve --watch",
"start:storybook": "nx run ui:storybook",
@ -194,6 +200,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"replace-in-file": "7.0.1",
"run-script-os": "^1.1.6",
"storybook": "7.0.9",
"ts-jest": "29.1.0",
"ts-node": "10.9.1",

5
yarn.lock

@ -16665,6 +16665,11 @@ run-parallel@^1.1.9:
dependencies:
queue-microtask "^1.2.2"
run-script-os@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/run-script-os/-/run-script-os-1.1.6.tgz#8b0177fb1b54c99a670f95c7fdc54f18b9c72347"
integrity sha512-ql6P2LzhBTTDfzKts+Qo4H94VUKpxKDFz6QxxwaUZN0mwvi7L3lpOI7BqPCq7lgDh3XLl0dpeXwfcVIitlrYrw==
rw@1:
version "1.3.3"
resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4"

Loading…
Cancel
Save