John williams
John williams

Reputation: 731

Angular build for production

I am fairly new to Angular, I am currently trying to work out how to serve only the necessary files to my deployment server.

Ideally, I wouldn't want to include the angular library in my project repo. Instead, I would like to install in the build process.

Like I said this is fairly new to me so am not entirely sure whether this is achievable or not?

Upvotes: 1

Views: 273

Answers (1)

Karbos 538
Karbos 538

Reputation: 3055

Angular 2 will be a dependancy of your project. Concretely you will have some javascript files added at installation (npm install) in your ROOT/node_module directory.

They will not be include in your NPM repo if you add a root file in your project named .npmignore with at least this content :

node_modules

You can do the same for your GIT repository and a file named .gitignore with at least this content :

node_modules/

Upvotes: 1

Related Questions