New Build Process
This section will explain the new build process since the refactor.
The new package.json contains the following scripts:
"scripts": {
"clean": "rimraf out-tsc dist",
"prebuild": "npm run clean",
"build": "node build.js && scss-bundle -c scss-bundle.config.json && node-sass dist/bundles/cedrus-project-fusion.scss dist/bundles/cedrus-project-fusion.css",
"build-demo": "tsc -p src/demo/",
"build-demo:watch": "tsc -p src/demo/ -w",
"serve": "lite-server -c=bs-config.json",
"prestart": "npm run build-demo",
"start": "concurrently \"npm run build-demo:watch\" \"npm run serve\"",
"build-test": "tsc -p src/lib/tsconfig.spec.json",
"build-test:watch": "tsc -p src/lib/tsconfig.spec.json -w",
"pretest": "npm run build-test",
"test": "concurrently \"npm run build-test:watch\" \"karma start karma.conf.js\"",
"pretest:once": "npm run build-test",
"test:once": "karma start karma.conf.js --single-run",
"preintegration": "npm run build && cd integration && npm run clean && npm install",
"integration": "npm run integration:aot && npm run integration:jit",
"integration:jit": "cd integration && npm run e2e",
"integration:aot": "cd integration && npm run e2e:aot",
"lint": "tslint ./src/**/*.ts -t verbose"
},
I will briefly go over the important scripts and what each script does.
build runs the build.js script, bundles scss and compiles scss bundle to css
build-demo:watch builds the demo application in watch mode
serve serves the demo application via BrowserSync
start runs build-demo:watch & serve
test runs your tests
integration builds a small sandbox in which to run E2E specs
The relevant scripts for you, the developer, are going to be build and start. You will use build to build new versions of the application and start to build the demo application so you can test your new components and create examples for them.
Last updated