- You may want to deploy different code bundle in different cloud platforms or environments
- For example, you may create different renderer for Google Cloud and its counter part for Azure.
- Due to code inspection/regulation policies, the code run in Google Cloud production should not include any code that is only for Azure
- No CSS
- No JS
- No HTML
- This project offers a simple architecture for you to get started
- We create different environments for different renderer in
angular.json
- We import different rendering modules according to the environment
- UglifyJS compiler will perform static code analysis and remove the module that is not included in the current environment
- UglifyJS will remove JS/HTML/CSS code all together in the production bundle
npm install
- Run
npm run build-azure
- Check
dist/my-first-project
and you will find only CSS/JS/HTML code of Azure
- Run
npm run build-googlecloud
- Check
dist/my-first-project
and you will find only CSS/JS/HTML code of GoogleCloud
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
- 10.2
- MIT
- Paul Shunfang Lan, https://xiaofang.me