An Angular starter featuring Angular 5 and Webpack includes (Tslint, Codelyzer, Composedoc, Moq.ts, Fixture)
This project is well supported with vscode editor. Easy deployment with PCF (pivot clound foundry).
Uses .scss files for styling and no .css loaders are configured, add your own css loaders to support .css extensions
npm installto install dependenciesnpm run servequick launch of webpack-devserver that supports live-reloadnpm run buildbuild development ready files to dist directorynpm run publishbuild production ready files to public directorynpm run serve:devstarts dev server locallynpm run serve:prodstarts production ready server locally and watch out file loading response times.npm run lintruns coding standards rules across entire project (these rules can be set in tslint.json)npm startbuild and start production ready servernpm run test:karmakarma-chrome-launcher runs the jasmine unit test cases in chrome browsernpm run webdriver:startstart the selenium webdriver before running protractor e2e testsnpm run test:protractorlaunch the protractor e2e tests
Before running
serve:devandserve:prod, make sure thenpm run buildandnpm run publishare executed to build output files.
-
config
Webpack configuration files for different enviroments.
-
pcf_settings
PCF deployment steps and files.
-
src
Angular source code.
-
e2e
End to End tests.
-
vscode_settings
VSCode editor configuration files specific to angular. Copy these files to your local .vscode project directory and you will automatically get suggestions to install plugins. Install these plugins for good dev experience.
-
pcf_steps.txt
Explains how to deploy your application to PCF environment
-
installation.txt
Explains the softwares required to start building angular-starter application
- Easy switching between early and lazy load of modules in angular by configuring global.lazyLoad property in
config/start.js - Support to load external files like bootstrap, jquery in 3 configurable ways in
config/webpack.build.js- Load via CDN, configure cdn property in
config\webpack.pkgs.js - Load via Local modules, configure local in
config\webpack.pkgs.js - Load local modules but bundle them, import those files in
src/vendor.tswith extensions
- Load via CDN, configure cdn property in
Comment local modules import in
vendor.tswhen you choose cdn | local
- Easy switch between hash and non hash based url. Configure
src/app/app.configuration.ts - Angular supports CaseSensitiveUrling which is the default web standard, configurable
src/app/app.configuration.ts - Enable angular prod mode by setting environment: prod property in
src/app/app.configuration.ts
- This project uses webpack-conditional-loader to support easy switch between lazy and early load of modules.
- This project uses codelyzer for configuring coding standards across teams.
- This project uses composedoc to build your angular documentation, we can look at generated docs for quick understanding of project architecture.
@NgModuleconfiguration object splitted out to seperate.configfile undersetupdirectory for each module (ex: About) to increase the smooth development in testing the components
- Move app configuration from app.configuration.ts to app.configuration.json to reduce rebuild on configuration changes but this requires us to do http.get request on application startup because angular can only read .ts files and not the .json files.
- Configure sourcemaps builds for specific .ts files. We can exclude vendor.ts, polyfiils.ts from source maps generation.