Skip to content

Commit

Permalink
chore: use new lerna watch command to build/copy SASS files (#869)
Browse files Browse the repository at this point in the history
* chore: use new lerna watch command to build/copy SASS files
- cleanup all the SASS scripts, combine them when possible with the use of `*` when possible and also the new `lerna watch` as a script in the root to copy SASS file into dist folder
  • Loading branch information
ghiscoding authored Jan 19, 2023
1 parent cd2cb16 commit 268c97b
Show file tree
Hide file tree
Showing 19 changed files with 199 additions and 234 deletions.
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"clean": "rimraf --maxBusyTries=10 packages/*/dist dist",
"cypress": "cypress open --config-file test/cypress.config.ts",
"cypress:ci": "cypress run --config-file test/cypress.config.ts",
"dev:watch": "cross-env TSC_WATCHFILE=UseFsEventsWithFallbackDynamicPolling pnpm -r --parallel run dev:watch",
"dev": "cross-env TSC_WATCHFILE=UseFsEventsWithFallbackDynamicPolling pnpm -r --parallel run dev:watch",
"dev:watch": "run-p dev sass:watch",
"sass:watch": "lerna watch --scope=@slickgrid-universal/common --glob=\"src/**/*.scss\" -- cross-env-shell pnpm -r --filter $LERNA_PACKAGE_NAME sass:copy",
"preview:publish": "lerna publish from-package --dry-run",
"preview:version": "lerna version --dry-run",
"preview:roll-new-release": "pnpm bundle && pnpm new-version --dry-run && pnpm new-publish --dry-run",
Expand All @@ -45,8 +47,9 @@
"devDependencies": {
"@4tw/cypress-drag-drop": "^2.2.3",
"@jest/types": "^29.3.1",
"@lerna-lite/cli": "^1.13.0",
"@lerna-lite/run": "^1.13.0",
"@lerna-lite/cli": "^1.14.1",
"@lerna-lite/run": "^1.14.1",
"@lerna-lite/watch": "^1.14.1",
"@types/jest": "^29.2.5",
"@types/node": "^18.11.18",
"@typescript-eslint/eslint-plugin": "^5.48.1",
Expand All @@ -63,6 +66,7 @@
"jsdom": "^21.0.0",
"jsdom-global": "^3.0.2",
"moment-mini": "^2.29.4",
"npm-run-all2": "^6.0.4",
"pnpm": "^7.24.3",
"rimraf": "^3.0.2",
"rxjs": "^7.5.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/binding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
"bundle": "run-p bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018"
},
Expand Down
28 changes: 9 additions & 19 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,42 +27,33 @@
"scripts": {
"prebuild": "pnpm run clean",
"build": "pnpm run bundle:commonjs",
"postbuild": "pnpm run sass:build sass:copy",
"postbuild": "run-s sass:build sass:copy",
"build:watch": "tsc --incremental --watch",
"clean": "rimraf --maxBusyTries=10 packages/*/dist dist",
"dev": "run-s build sass:build sass:copy --npm-path npm",
"dev:watch": "run-p build:watch sass:watch --npm-path npm",
"dev": "run-s build sass:build sass:copy",
"dev:watch": "run-p build:watch sass:watch",
"prebundle": "pnpm run clean",
"bundle": "npm-run-all bundle:commonjs bundle:esm --npm-path npm",
"postbundle": "pnpm run sass:build sass:copy",
"bundle": "run-p bundle:commonjs bundle:esm",
"postbundle": "run-s sass:build sass:copy",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018",
"sass-build-task:scss-compile:bootstrap": "sass src/styles/slickgrid-theme-bootstrap.scss dist/styles/css/slickgrid-theme-bootstrap.css --style=compressed --quiet-deps --no-source-map",
"postsass-build-task:scss-compile:bootstrap": "postcss --no-map --use autoprefixer --output dist/styles/css/slickgrid-theme-bootstrap.css dist/styles/css/slickgrid-theme-bootstrap.css --style=compressed",
"sass-build-task:scss-compile:material": "sass src/styles/slickgrid-theme-material.scss dist/styles/css/slickgrid-theme-material.css --style=compressed --quiet-deps --no-source-map",
"postsass-build-task:scss-compile:material": "postcss --no-map --use autoprefixer --output dist/styles/css/slickgrid-theme-material.css dist/styles/css/slickgrid-theme-material.css --style=compressed",
"sass-build-task:scss-compile:material-bare": "sass src/styles/slickgrid-theme-material.bare.scss dist/styles/css/slickgrid-theme-material.bare.css --style=compressed --quiet-deps --no-source-map",
"postsass-build-task:scss-compile:material-bare": "postcss --no-map --use autoprefixer --output dist/styles/css/slickgrid-theme-material.bare.css dist/styles/css/slickgrid-theme-material.bare.css --style=compressed",
"sass-build-task:scss-compile:material-lite": "sass src/styles/slickgrid-theme-material.lite.scss dist/styles/css/slickgrid-theme-material.lite.css --style=compressed --quiet-deps --no-source-map",
"postsass-build-task:scss-compile:material-lite": "postcss --no-map --use autoprefixer --output dist/styles/css/slickgrid-theme-material.lite.css dist/styles/css/slickgrid-theme-material.lite.css --style=compressed",
"sass-build-task:scss-compile:salesforce": "sass src/styles/slickgrid-theme-salesforce.scss dist/styles/css/slickgrid-theme-salesforce.css --style=compressed --quiet-deps --no-source-map",
"postsass-build-task:scss-compile:salesforce": "postcss --no-map --use autoprefixer --output dist/styles/css/slickgrid-theme-salesforce.css dist/styles/css/slickgrid-theme-salesforce.css --style=compressed",
"sass-build-task:scss-compile:salesforce-bare": "sass src/styles/slickgrid-theme-salesforce.bare.scss dist/styles/css/slickgrid-theme-salesforce.bare.css --style=compressed --quiet-deps --no-source-map",
"postsass-build-task:scss-compile:salesforce-bare": "postcss --no-map --use autoprefixer --output dist/styles/css/slickgrid-theme-salesforce.bare.css dist/styles/css/slickgrid-theme-salesforce.bare.css --style=compressed",
"sass-build-task:scss-compile:salesforce-lite": "sass src/styles/slickgrid-theme-salesforce.lite.scss dist/styles/css/slickgrid-theme-salesforce.lite.css --style=compressed --quiet-deps --no-source-map",
"postsass-build-task:scss-compile:salesforce-lite": "postcss --no-map --use autoprefixer --output dist/styles/css/slickgrid-theme-salesforce.lite.css dist/styles/css/slickgrid-theme-salesforce.lite.css --style=compressed",
"sass:build": "run-p sass-build-task:scss-compile:* --npm-path npm",
"sass:build": "run-p sass-build-task:scss-compile:*",
"postsass:build": "postcss --no-map --use autoprefixer --dir dist/styles/css dist/styles/css --style=compressed --quiet-deps --no-source-map",
"presass:copy": "cross-env copyfiles -f src/styles/*.png dist/styles/css",
"sass:copy": "cross-env copyfiles -f src/styles/*.scss dist/styles/sass",
"postsass:copy": "cross-env copyfiles -f src/styles/*.png dist/styles/sass",
"presass:watch:bootstrap": "npm run sass-build-task:scss-compile:bootstrap",
"sass:watch:bootstrap": "npm run sass-build-task:scss-compile:bootstrap -- --watch",
"presass:watch:material": "npm run sass-build-task:scss-compile:material",
"sass:watch:material": "npm run sass-build-task:scss-compile:material -- --watch",
"presass:watch:salesforce": "npm run sass-build-task:scss-compile:salesforce",
"sass:watch:salesforce": "npm run sass-build-task:scss-compile:salesforce -- --watch",
"sass:watch": "run-p sass:watch:bootstrap sass:watch:material sass:watch:salesforce sass:copy:watch --npm-path npm",
"sass:copy:watch": "nodemon --ext scss --watch src/styles/*.scss --exec \"npm run sass:copy\""
"sass:watch": "run-p sass:watch:*",
"sass:watch-all": "run-p \"sass-build-task:scss-compile:* --watch\" --"
},
"browserslist": [
"last 2 version",
Expand Down Expand Up @@ -90,7 +81,6 @@
"autoprefixer": "^10.4.13",
"copyfiles": "^2.4.1",
"cross-env": "^7.0.3",
"nodemon": "^2.0.20",
"npm-run-all2": "^6.0.4",
"postcss": "^8.4.21",
"postcss-cli": "^10.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/composite-editor-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
"bundle": "run-p bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/custom-footer-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
"bundle": "run-p bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/custom-tooltip-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
"bundle": "run-p bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/empty-warning-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
"bundle": "run-p bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/event-pub-sub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
"bundle": "run-p bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/excel-export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm"
"bundle": "run-p bundle:commonjs bundle:esm"
},
"license": "MIT",
"author": "Ghislain B.",
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
"bundle": "run-p bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/odata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
"bundle": "run-p bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/pagination-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
"bundle": "run-p bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/row-detail-view-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
"bundle": "run-p bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/rxjs-observable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
"bundle": "run-p bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/text-export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
"bundle": "run-p bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
"bundle": "run-p bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/vanilla-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dev": "pnpm run bundle:commonjs",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "npm-run-all bundle:commonjs bundle:esm --npm-path npm",
"bundle": "npm-run-all bundle:commonjs bundle:esm",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018",
"test": "echo testing slickgrid-universal slickgrid-vanilla-bundle code"
Expand Down
2 changes: 1 addition & 1 deletion packages/vanilla-force-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dev": "webpack --env development",
"dev:watch": "tsc --incremental --watch",
"prebundle": "pnpm run clean",
"bundle": "npm-run-all bundle:commonjs bundle:esm webpack:prod --npm-path npm",
"bundle": "npm-run-all bundle:commonjs bundle:esm webpack:prod",
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018",
"prebundle:zip": "pnpm run delete:zip",
Expand Down
Loading

0 comments on commit 268c97b

Please sign in to comment.