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

[INFRA] Simplify demo CSS watch configuration #1753

Merged
merged 2 commits into from Jan 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions docs/contributors/demo-page-css.md
Expand Up @@ -4,10 +4,8 @@ The project demo page uses [tailwindcss](https://tailwindcss.com/docs).
To process the CSS rules and get an output `tailwind.css` file, which is used in demo page:
run: `npm run demo`

Sub job `demo:css` does the trick, it uses postcss. Feel free to preview config files:
The `demo:css` npm script does the trick, it uses postcss. Feel free to preview config files:
- [postcss.config.js](postcss.config.js)
- [tailwind.config.js](tailwind.config.js)

The Rollup build is updated to handle livereload, there are 2 scripts in [package.json](../../package.json) that permits that: \
1. Build the output tailwind.css file: `demo:css`
2. Watch for the changes in html and styles.css. `watch:css`
The Rollup build handles the livereload and the html/css resources watch.
304 changes: 0 additions & 304 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Expand Up @@ -61,7 +61,6 @@
"docs:api": "typedoc --tsconfig ./tsconfig.typedoc.json src/bpmn-visualization.ts",
"start": "rollup -c --silent --environment devMode:true",
"watch": "rollup -cw --environment devLiveReloadMode:true",
"watch:css": "chokidar \"dev/public/static/css/styles.css\" \"dev/public/*.html\" --command \"npm run demo:css\" --verbose",
"lint": "eslint \"*/**/*.{js,ts}\" NOTICE --max-warnings 0 --quiet --fix",
"lint-check": "eslint \"*/**/*.{js,ts}\" NOTICE --max-warnings 0",
"test": "run-s test:unit test:integration test:e2e",
Expand Down Expand Up @@ -106,7 +105,6 @@
"@typescript-eslint/parser": "^5.9.1",
"asciidoctor": "^2.2.5",
"autoprefixer": "^10.4.2",
"chokidar-cli": "^3.0.0",
"clipboardy": "^3.0.0",
"cross-env": "^7.0.3",
"cssnano": "^5.0.15",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Expand Up @@ -150,7 +150,7 @@ function pluginsForDevelopment() {
if (devMode || demoMode) {
plugins.push(execute('npm run demo:css', true)); // sync to ensure the execution is linked to the main rollup process
if (devLiveReloadMode) {
plugins.push(execute('npm run watch:css'));
plugins.push(execute('npm run demo:css -- --watch --verbose'));
}

const copyTargets = [];
Expand Down