diff --git a/package.json b/package.json index 21ddf2f8711..d3ed345f04d 100644 --- a/package.json +++ b/package.json @@ -15,11 +15,16 @@ "license": "Apache-2.0", "type": "module", "scripts": { - "build": "vue-tsc -p tsconfig.build.json --noEmit && vite build --emptyOutDir && tikui-core build", - "dev": "run-p tikui:serve webapp:serve", + "build": "npm-run-all build:*", + "build:tikui": "tikui-core build", + "build:tsc": "vue-tsc -p tsconfig.build.json --noEmit", + "build:vite": "vite build --emptyOutDir", + "dev": "npm-run-all --parallel dev:*", + "dev:tikui": "tikui-core serve", + "dev:vite": "vite", "e2e": "cypress open --config-file src/test/webapp/e2e/cypress-config.ts", "e2e:headless": "cypress run --headless --config-file src/test/webapp/e2e/cypress-config.ts", - "format": "prettier . --write", + "format": "npm run prettier:format", "glyph:build": "rimraf .fontello-session && fontello-cli install --config src/main/glyph/config.json --font src/main/glyph/font --css src/main/glyph/css", "glyph:open": "rimraf .fontello-session && fontello-cli open --config src/main/glyph/config.json", "lint": "eslint . --fix --plugin eslint-plugin-pug src/main/style/**/*.pug && npm run lint:sass && npm run prettier:format", @@ -32,13 +37,14 @@ "preview": "vite preview", "start": "npm run dev", "test": "npm run test:watch", - "test:component": "start-server-and-test tikui:serve-build http://localhost:9005 webapp:serve http://localhost:9000 'cypress open --e2e --config-file src/test/webapp/component/cypress-config.ts'", - "test:component:headless": "start-server-and-test tikui:serve-build http://localhost:9005 webapp:serve http://localhost:9000 'cypress run --headless --config-file src/test/webapp/component/cypress-config.ts'", + "test:component": "start-server-and-test tikui:serve-build http://localhost:9005 dev:vite http://localhost:9000 'cypress open --e2e --config-file src/test/webapp/component/cypress-config.ts'", + "test:component:headless": "start-server-and-test tikui:serve-build http://localhost:9005 dev:vite http://localhost:9000 'cypress run --headless --config-file src/test/webapp/component/cypress-config.ts'", "test:coverage": "vitest run --coverage", "test:watch": "vitest --", - "tikui:serve": "tikui-core serve", - "tikui:serve-build": "tikui-core build && serve -p 9005 target/classes/public/style ", - "webapp:serve": "vite" + "tikui:serve-build": "tikui-core build && serve -p 9005 target/classes/public/style", + "watch:": "npm-run-all --parallel watch:*", + "watch:test": "npm run test:watch", + "watch:tsc": "npm run build:tsc -- --watch" }, "dependencies": { "axios": "1.7.7",