Skip to content

Commit

Permalink
feat: add rebuild command
Browse files Browse the repository at this point in the history
  • Loading branch information
djabarovgeorge committed Aug 22, 2022
1 parent c4e2ead commit 290af83
Show file tree
Hide file tree
Showing 38 changed files with 4,955 additions and 2,611 deletions.
5 changes: 4 additions & 1 deletion _templates/provider/new/package.ejs.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"license": "MIT",
"keywords": [],
"scripts": {
"prebuild": "rimraf build",
"build": "run-p build:*",
"rebuild": "npm run prebuild && npm run build",
"build:main": "tsc -p tsconfig.json",
"build:module": "tsc -p tsconfig.module.json",
"fix": "run-s fix:*",
Expand Down Expand Up @@ -54,7 +56,8 @@
"ts-jest": "^27.0.5",
"ts-node": "^9.0.0",
"typedoc": "^0.19.0",
"typescript": "4.6.2"
"typescript": "4.6.2",
"rimraf": "^3.0.2"
},
"files": [
"build/main",
Expand Down
3 changes: 3 additions & 0 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"private": "true",
"license": "MIT",
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"rebuild": "pnpm prebuild && pnpm build",
"format": "prettier --write \"src/**/*.ts\"",
"precommit": "lint-staged",
"docker:build": "pnpm --silent --workspace-root pnpm-context -- apps/api/Dockerfile | docker build --build-arg PACKAGE_PATH=apps/api - -t novu-api",
Expand Down Expand Up @@ -92,6 +94,7 @@
"passport-oauth2": "^1.6.1",
"recursive-diff": "^1.0.8",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.5.5",
"sanitize-html": "^2.4.0",
"shortid": "^2.2.16",
Expand Down
41 changes: 22 additions & 19 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@
"name": "@novu/web",
"version": "0.7.0",
"private": true,
"scripts": {
"start": "cross-env PORT=4200 react-app-rewired start",
"prebuild": "rimraf build",
"build": "react-app-rewired build",
"rebuild": "pnpm prebuild && pnpm build",
"test": "react-app-rewired test",
"precommit": "lint-staged",
"envsetup:docker": "chmod +x ./env.sh && ./env.sh && mv ./env-config.js ./build/env-config.js",
"envsetup": "chmod +x ./env.sh && ./env.sh && mv env-config.js ./public/env-config.js",
"start:static:build": "pnpm envsetup:docker && http-server build -p 4200 --proxy http://localhost:4200?",
"start:docker": "pnpm build && pnpm start:static:build",
"start:dev": "pnpm start",
"cypress:run": "cross-env NODE_ENV=test cypress run",
"cypress:open": "cross-env NODE_ENV=test cypress open",
"cypress:run:components": "cross-env NODE_ENV=test cypress run --component",
"start:api": "cd ../../ && pnpm start:e2e:api",
"storybook": "start-storybook -p 6006 -s public",
"build-storybook": "build-storybook -s public",
"lint": "eslint src",
"lint:fix": "pnpm lint -- --fix"
},
"dependencies": {
"@ant-design/icons": "^4.6.2",
"@babel/plugin-proposal-optional-chaining": "^7.16.5",
Expand Down Expand Up @@ -66,6 +87,7 @@
"react-syntax-highlighter": "^15.4.3",
"react-table": "^7.7.0",
"react-use-intercom": "^2.0.0",
"rimraf": "^3.0.2",
"storybook-dark-mode": "^1.0.8",
"styled-components": "^5.2.1",
"typescript": "4.5.4",
Expand Down Expand Up @@ -106,25 +128,6 @@
"typescript": "4.6.3",
"webpack": "^5.74.0"
},
"scripts": {
"start": "cross-env PORT=4200 react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"precommit": "lint-staged",
"envsetup:docker": "chmod +x ./env.sh && ./env.sh && mv ./env-config.js ./build/env-config.js",
"envsetup": "chmod +x ./env.sh && ./env.sh && mv env-config.js ./public/env-config.js",
"start:static:build": "pnpm envsetup:docker && http-server build -p 4200 --proxy http://localhost:4200?",
"start:docker": "pnpm build && pnpm start:static:build",
"start:dev": "pnpm start",
"cypress:run": "cross-env NODE_ENV=test cypress run",
"cypress:open": "cross-env NODE_ENV=test cypress open",
"cypress:run:components": "cross-env NODE_ENV=test cypress run --component",
"start:api": "cd ../../ && pnpm start:e2e:api",
"storybook": "start-storybook -p 6006 -s public",
"build-storybook": "build-storybook -s public",
"lint": "eslint src",
"lint:fix": "pnpm lint -- --fix"
},
"browserslist": {
"production": [
">0.2%",
Expand Down
43 changes: 23 additions & 20 deletions apps/widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@
"name": "@novu/widget",
"version": "0.7.0",
"private": true,
"scripts": {
"start": "craco start",
"start:dev": "cross-env PORT=4500 pnpm start",
"start:cli:local": "pnpm start:shell:test & pnpm start:shell:embed & cross-env PORT=3500 pnpm start",
"start:test": "pnpm start:shell:test & pnpm start:shell:embed & cross-env NODE_ENV=test REACT_APP_API_URL=http://localhost:1336 REACT_APP_WS_URL=http://localhost:1340 PORT=3500 pnpm start",
"envsetup": "chmod +x ./env.sh && ./env.sh && mv env-config.js ./public/env-config.js",
"envsetup:docker": "chmod +x ./env.sh && ./env.sh && mv ./env-config.js ./build/env-config.js",
"start:static:build": "pnpm envsetup:docker && http-server build -p 4500 --proxy http://localhost:4500?",
"start:docker": "pnpm build && pnpm start:static:build",
"prebuild": "rimraf build",
"build": "craco build",
"rebuild": "pnpm prebuild && pnpm build",
"test": "craco test",
"precommit": "lint-staged",
"eject": "craco eject",
"lint": "eslint src",
"cypress:run": "cypress run",
"cypress:open": "cypress open",
"start:shell:test": "http-server . -p 4700",
"start:shell:embed": "http-server ../../libs/embed/dist -p 4702",
"start:api": "cd ../../ && pnpm run start:e2e:api"
},
"dependencies": {
"@ant-design/icons": "^4.5.0",
"@mantine/core": "^4.1.0",
Expand Down Expand Up @@ -34,6 +56,7 @@
"react-refresh": "^0.11.0",
"react-router-dom": "^6.2.2",
"react-scripts": "4.0.1",
"rimraf": "^3.0.2",
"socket.io-client": "2.3.1",
"styled-components": "5.2.1",
"typescript": "^4.0.3",
Expand Down Expand Up @@ -63,26 +86,6 @@
"typescript": "4.6.2",
"webpack-dev-server": "4.9.2"
},
"scripts": {
"start": "craco start",
"start:dev": "cross-env PORT=4500 pnpm start",
"start:cli:local": "pnpm start:shell:test & pnpm start:shell:embed & cross-env PORT=3500 pnpm start",
"start:test": "pnpm start:shell:test & pnpm start:shell:embed & cross-env NODE_ENV=test REACT_APP_API_URL=http://localhost:1336 REACT_APP_WS_URL=http://localhost:1340 PORT=3500 pnpm start",
"envsetup": "chmod +x ./env.sh && ./env.sh && mv env-config.js ./public/env-config.js",
"envsetup:docker": "chmod +x ./env.sh && ./env.sh && mv ./env-config.js ./build/env-config.js",
"start:static:build": "pnpm envsetup:docker && http-server build -p 4500 --proxy http://localhost:4500?",
"start:docker": "pnpm build && pnpm start:static:build",
"build": "craco build",
"test": "craco test",
"precommit": "lint-staged",
"eject": "craco eject",
"lint": "eslint src",
"cypress:run": "cypress run",
"cypress:open": "cypress open",
"start:shell:test": "http-server . -p 4700",
"start:shell:embed": "http-server ../../libs/embed/dist -p 4702",
"start:api": "cd ../../ && pnpm run start:e2e:api"
},
"browserslist": {
"production": [
">0.2%",
Expand Down
2 changes: 2 additions & 0 deletions apps/ws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"private": true,
"license": "UNLICENSED",
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"rebuild": "pnpm prebuild && pnpm build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nodemon",
"start:dev": "nodemon",
Expand Down
3 changes: 3 additions & 0 deletions libs/dal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"scripts": {
"start": "npm run start:dev",
"afterinstall": "pnpm build",
"prebuild": "rimraf dist",
"build": "cross-env node_modules/.bin/tsc -p tsconfig.build.json",
"rebuild": "pnpm prebuild && pnpm build",
"build:watch": "cross-env node_modules/.bin/tsc -p tsconfig.build.json -w --preserveWatchOutput",
"start:dev": "pnpm build:watch",
"precommit": "lint-staged",
Expand Down Expand Up @@ -46,6 +48,7 @@
"mongoose-delete": "^0.5.4",
"ng-intercom": "^8.0.2",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"superagent-defaults": "^0.1.14",
"supertest": "^5.0.0",
"twilio": "^3.62.0",
Expand Down
1 change: 1 addition & 0 deletions libs/embed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"lint:fix": "pnpm lint -- --fix",
"prebuild": "rimraf dist",
"build": "tsc && cross-env ENVIRONMENT=local rollup -c rollup.config.ts",
"rebuild": "pnpm prebuild && pnpm build",
"build:dev": "tsc && cross-env ENVIRONMENT=dev rollup -c rollup.config.ts",
"build:prod": "tsc && cross-env ENVIRONMENT=production rollup -c rollup.config.ts",
"start": "cross-env ENVIRONMENT=local rollup -c rollup.config.ts -w",
Expand Down
5 changes: 4 additions & 1 deletion libs/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"scripts": {
"start": "npm run start:dev",
"afterinstall": "pnpm build",
"prebuild": "rimraf dist",
"build": "cross-env node_modules/.bin/tsc -p tsconfig.build.json",
"rebuild": "pnpm prebuild && pnpm build",
"build:watch": "cross-env node_modules/.bin/tsc -p tsconfig.build.json -w --preserveWatchOutput",
"start:dev": "pnpm build:watch",
"precommit": "lint-staged",
Expand All @@ -22,7 +24,8 @@
"axios": "^0.26.1",
"class-transformer": "0.5.1",
"class-validator": "0.13.2",
"mixpanel": "^0.13.0"
"mixpanel": "^0.13.0",
"rimraf": "^3.0.2"
},
"devDependencies": {
"@types/bluebird": "^3.5.24",
Expand Down
3 changes: 3 additions & 0 deletions libs/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"scripts": {
"start": "npm run start:dev",
"afterinstall": "pnpm build",
"prebuild": "rimraf dist",
"build": "cross-env node_modules/.bin/tsc -p tsconfig.build.json",
"rebuild": "pnpm prebuild && pnpm build",
"build:watch": "cross-env node_modules/.bin/tsc -p tsconfig.build.json -w --preserveWatchOutput",
"start:dev": "pnpm build:watch",
"precommit": "lint-staged",
Expand Down Expand Up @@ -35,6 +37,7 @@
"mongoose": "6.4.6",
"ng-intercom": "^8.0.2",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"superagent-defaults": "^0.1.14",
"supertest": "^5.0.0",
"uuid": "^8.3.0"
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"start:docker:widget": "cross-env nx run-many --target=start:docker --projects=@novu/widget",
"docker:build": "pnpm -r --if-present --parallel docker:build",
"build": "nx run-many --target=build --all",
"rebuild": "npm run prebuild && npm run build",
"prebuild": "nx run-many --target=prebuild --all",
"build:api": "nx build @novu/api",
"build:ws": "nx build @novu/ws",
"build:web": "nx build @novu/web",
Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build:post": "cross-env mkdir dist/constants/dashboard && cp-cli src/constants/dashboard/index.html dist/constants/dashboard/index.html",
"build:pre": "rimraf dist",
"build": "pnpm build:pre && tsc -p tsconfig.build.json && pnpm build:post",
"rebuild": "pnpm build",
"build:prod": "pnpm build:pre && pnpm build && pnpm build:post",
"format": "prettier --write \"src/**/*.ts\"",
"precommit": "lint-staged",
Expand Down
5 changes: 4 additions & 1 deletion packages/nest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"license": "MIT",
"keywords": [],
"scripts": {
"prebuild": "rimraf build",
"build": "run-p build:*",
"rebuild": "npm run prebuild && npm run build",
"build:main": "tsc -p tsconfig.json",
"build:module": "tsc -p tsconfig.module.json",
"fix": "run-s fix:*",
Expand Down Expand Up @@ -53,7 +55,8 @@
"ts-jest": "^27.0.5",
"ts-node": "^9.0.0",
"typedoc": "^0.19.0",
"typescript": "4.6.2"
"typescript": "4.6.2",
"rimraf": "^3.0.2"
},
"files": [
"build/main",
Expand Down
5 changes: 4 additions & 1 deletion packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"scripts": {
"start": "npm run start:dev",
"start:dev": "npm run watch:build",
"prebuild": "rimraf build",
"build": "run-p build:*",
"rebuild": "npm run prebuild && npm run build",
"build:main": "tsc -p tsconfig.json",
"build:module": "tsc -p tsconfig.module.json",
"lint": "pnpm test:lint",
Expand Down Expand Up @@ -62,7 +64,8 @@
"run-p": "0.0.0",
"ts-jest": "^27.0.5",
"typedoc": "^0.19.0",
"typescript": "4.1.3"
"typescript": "4.1.3",
"rimraf": "^3.0.2"
},
"files": [
"build/main",
Expand Down
3 changes: 3 additions & 0 deletions packages/notification-center/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"description": "",
"scripts": {
"start": "npm run build:watch",
"prebuild": "rimraf dist",
"build": "rollup -c",
"rebuild": "npm run prebuild && npm run build",
"build:watch": "rollup -c -w",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
Expand Down Expand Up @@ -34,6 +36,7 @@
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-terser": "^7.0.2",
"tslib": "^2.3.1",
"rimraf": "^3.0.2",
"typescript": "^4.4.4"
},
"peerDependencies": {
Expand Down
5 changes: 4 additions & 1 deletion packages/stateless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"scripts": {
"start": "npm run start:dev",
"start:dev": "npm run watch:build",
"prebuild": "rimraf build",
"build": "run-p build:*",
"rebuild": "npm run prebuild && npm run build",
"build:main": "tsc -p tsconfig.json",
"build:module": "tsc -p tsconfig.module.json",
"lint": "pnpm test:lint",
Expand Down Expand Up @@ -61,7 +63,8 @@
"run-p": "0.0.0",
"ts-jest": "^27.0.5",
"typedoc": "^0.19.0",
"typescript": "4.1.3"
"typescript": "4.1.3",
"rimraf": "^3.0.2"
},
"files": [
"build/main",
Expand Down
Loading

0 comments on commit 290af83

Please sign in to comment.