-
Notifications
You must be signed in to change notification settings - Fork 143
Gulp Tasks
You can find all the task in
config/gulp/tasksfolder for more detail.
Serve the application in development mode
- Compile all
*.tsfiles - Start
live-server, open up a browser, and watch for file changes - If
*.tsfile is changed, it'll recompile and refresh your browser.
Serve the application in production mode
- It'll cleanup previous build folder
- Compile all
*.ts - Run SystemJS Builder/Webpack to bundle the
app/main.jsintobuild/app/bundle.jsand uglify it - Copy fonts in node modules to build folder
- Remove unused script reference since it's already bundled in
build/app/boot.js - Copy all
*.htmlinappfolder, then startlive-server.
Compile main.scss file in assets/styles folder, you can add new *.scss file and import them in main.scss
Watch all SASS files *.scss in assets/styles folder, the changed file will be recompiled
All compilation will:
- generate sourcemaps using gulp-sourcemaps
- trigger
tslintand won't compile if it's failed (unless you're usinggulp watch-ts)
Run all TSC tasks.
Watch all TypeScript files, the changed file will be recompiled
Warning! The watch process may get killed if compilation fails, but it won't be killed if
tslintfails but will report the errors.
Compile all TypeScript files in app folder (except *.spec.ts files)
Compile all TypeScript spec files in app folder
and test-helper folder
Compile all TypeScript spec files in test/e2e folder
and test-helper folder
Run all tslint tasks.
Lint all TypeScript files in app folder (except *.spec.ts files)
Lint all TypeScript spec files in app folder
and test-helper folder
Lint all TypeScript spec files in test/e2e folder
and test-helper folder
add
-wor--watchoption for testing with watch mode
Default to call gulp unit-test but does clean-report before that.
Run the unit test task:
- Lint and Compile all typescripts
- Start Karma server
- Generate JSON for remap (the coverage is still in transpiled Javacript, so we need to remap it back to TypeScript)
- Remap the coverage using remap-istanbul and produces:
- HTML report
- LCOV.info
- JSON The coverage has been transformed into TypeScript
Default to call gulp build-systemjs but run the testing before that. Same as gulp serve-build but only create the bundle, no serving
Generate src/app/shared/constant/env.ts file from env.json. More details here.
Prepare assets optimization. Get called by gulp build.
By default, the starter uses SystemJS extension to bundle your app. You can swap to Webpack extension if you like it better.
Run all cleaning tasks.
Clean build folder generated by running build task
Clean report folder generated by running test task
Clean generated *.css file in assets/styles folder
Run all cleaning TS tasks
Clean only all compiled TS in app folder
Clean only all compiled spec TS and in app, src/test/e2e, and src/test/test-helpers folder
This starter may not fit for your workflow, since it's opinionated. Therefore you can always fork and custom it to fit your workflow
☀️ Support this starter by sharing it to your friends, giving stars, or pull requests! 😄