This is a sample project that helps you to implement your own deployment builder (ng deploy
) for the Angular CLI.
The groundwork of this starter was provided by Minko Gechev's ngx-gh project.
This project has the following purposes:
- To promote the adoption of
ng deploy
. - To clarify various questions and to standardise the experience of the various builders.
We hope for an inspiring discussion, pull requests and questions.
If you don't know ng deploy
yet, learn more about this command here:
👉 Blogpost: All you need to know about ng deploy
There are still differences between the existing builders. Let's find some rules that everyone agrees with. Here are two proposals.
To reduce the chances to deploy corrupted assets, it's important to build the app right before deploying it. (source)
Current state:
Currently there are existing deployment builders that only build in production mode.
This might be not enough.
There is also the approach not to perform the build step at all.
Our suggestion:
By default, a deployment builder shall compile in production
mode, but it should be possible to override the default configuration using the option --configuration
.
Discussion: angular-schule#1
To make it easier for the end user to get started, a deployment builder should ask for all the mandatory questions immediately after the ng add
.
The data should be persisted in the angular.json
file.
Note:
This feature is not implemented for this starter yet, but we are looking forward to your support.
Discussion: angular-schule#2
What's bothers you about this example? We appreciate your feedback!
- fork this repository
- adjust the
package.json
- search and replace for the string
@angular-schule/ngx-deploy-starter
andngx-deploy-starter
and choose your own name. - search and replace for the string
to the file system
and name your deploy target. - add your deployment code to
src/engine/engine.ts
, take care of the tests - follow the instructions from the contributors README for build, test and publishing.
You are free to customise this project according to your needs. Please keep the spirit of Open Source alive and use the MIT or a compatible license.
Code released under the MIT license.