Tagged: new project
- This topic has 6 replies, 3 voices, and was last updated 6 years, 7 months ago by Brian Fernandes.
-
AuthorPosts
-
Marvin TollParticipantI would like to be able to create a new project as follows:
ng new project –skip-git –style=scss –router
However, it seems the new project wizard is hard-coded as follows:
npm install @angular/cli@1.7.3
ng new project –skip-git
npm install –save-dev angular-ideIs there anyway to override the default and/or modify the generated CLI project?
support-swapnaModeratorMarvin,
I am afraid there is no way to customize the project creation commands at this point of time. An enhancement request is already filed for the dev team to support it. We will keep you posted when the support is added.
You can change the default css preprocessor of an existing angular project by running this command for the project in the Terminal+ view (ensure the right project is selected in the dropdown box):
ng set defaults.styleExt scss
So as a workaround, you can create angular project using the New Angular Project wizard and then change the default css preprocessor as suggested above.
Please refer to this thread which discusses similar issue for more details : https://stackoverflow.com/questions/36220256/angular-cli-sass-options/41541042
Hope this helps. Please let us know how it works for you.
–Swapna
MyEclipse Support
Marvin TollParticipantRegarding scss… there are two distinct outcomes when using (1) new project vs. the (2) set after the project is created. The implications of these distinctions is not entirely clear:
1. app.component.scss
2. app.component.css
Marvin TollParticipantWith the inability to use “ng new project –router” results in the following artifact not being generated:
app.routing.module.ts
Can this module simply be created outside of Webclipse… or, are there additional implications?
Brian FernandesModeratorMarvin,
You can add any files you like post project creation – however, since you’re adding them manually, making sure they are correctly hooked up to your existing source will be your responsibility.
Another option would be to create the project outside Angular IDE, use the angular-cli on the command line with the arguments you want. Once the project is created by the CLI, import it into Angular IDE using the File > Import > Angular > Angular Project wizard.
Hope this helps.
Marvin TollParticipanthmmm… did not realize that an Angular Import was available (and so obvious)… that sounds like the best way to deal with the hard-coded “ng new <project>” limitation for now. Please presume that works well unless I post back otherwise. [Thanks Brian]
Brian FernandesModeratorNo problem Marvin, have a great weekend!
-
AuthorPosts