Denis Stephanov
Denis Stephanov

Reputation: 5231

Angular CLI - change folder for source code

I want to start new Angular 5 project, but I need that my code will be in another folder than configuration files. Is possible to do that in cli commands?

For example here is my folder structure:

-/root
-/src/main/java
-/pom.xml

After generation Angular 5 project I need that, configuration files will be in root and source codes in src/main/webapp like that:

-/root
-/src/main/java
-/src/main/webapp
-/src/main/webapp/app
-/src/main/webapp/index.html
-/src/main/webapp/...
-/pom.xml
-/.angular-cli.json
-/package.json
-/...

Is it possible? If yes how? Thanks.

Upvotes: 4

Views: 6674

Answers (1)

Fredrik Lundin Grande
Fredrik Lundin Grande

Reputation: 8186

I'm your angular-cli.json file, you have an option called root that is used for specifying the directory of your apps root folder, relative to your configuration file.

You could for example put, a path like this, which might fit your need:

"root": "src/main/webapp/app",

Here is the documentation: https://github.com/angular/angular-cli/wiki/angular-cli

Upvotes: 5

Related Questions