This project exists to help you integrate Netlify into your Angular project and make your development process a little bit easier ♥.
For now, this schematic will generate a Netlify configuration file (netlify.json
) that will help aid in the deployment process and help you skip a few inputs if you're using the Netlify CLI. It will also create a file of private Netlify configuration information (netlifyConfig.json
) to aid in connecting to the API (we're not using this quite yet and it may be wiped from this schematic in later versions). Since, this information private, these schematics add this file to your .gitignore
file or create a .gitignore
file listing this file so it never sees the light of (public) day.
To add these schematics simply run the following command in your Angular project:
ng add netlify-schematics
You'll be prompted to add a few bits of information:
-
project's build command: for Angular projects this is usually
ng build
or for productionng build --prod
. -
directory of your build project: when you run your build command where does the built project live (for Angular it's
/dist/<project name>
for Angular + Scully prerender it'sdist/static
) -
Netlify API ID: this is found in your Netlify Site information page in the path
/sites/sitename/settings/general#siteinformation
. -
Personal Access Token: this is a very sensitive piece of data (why we add this file to the .gitignore file) that can be generated by going to your User Settings/Application/Personal access tokens or this link.
-
project name: the name of your project
Note: none of these properties are required if you do not add them the two files will still be generated, but they will have blank spots where your answers would be.
Want to add anything? Be my guest! Have any questions? Those go here or feel free to reach out on Twitter. Hope this helps, happy coding! 👩🏻💻