Skip to content

Change the defult path to ng build command #2223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bootrider opened this issue Sep 19, 2016 · 7 comments
Closed

Change the defult path to ng build command #2223

bootrider opened this issue Sep 19, 2016 · 7 comments

Comments

@bootrider
Copy link

bootrider commented Sep 19, 2016

using the ng build command, the result of the process is located at dist/.
if I want to generate the artifacts in other folder I use ng build -o c:\temp\
I want to change that folder with out having to explicit specified it in the command line.

where should I perform changes to achieve my goal?

@ranst91
Copy link

ranst91 commented Sep 19, 2016

It's my first time using that CLI, Yet it seems that "outDir": "dist",
inside:
"apps": [ { "root": "src", "outDir": "dist", "assets": "assets", "index": "index.html", "main": "main.ts", "test": "test.ts", "tsconfig": "tsconfig.json", "prefix": "app", "mobile": false, "styles": [ "styles.css" ], "scripts": [], "environments": { "source": "environments/environment.ts", "dev": "environments/environment.ts", "prod": "environments/environment.prod.ts" } } ],
in the angular-cli.json file is the logical choice.
Try to change the outDir and see if it solves your problem

@bootrider
Copy link
Author

I already try that, did not work, I also change in the tsconfing.json, neither worked

@Meligy
Copy link
Contributor

Meligy commented Sep 19, 2016

outDir doesn't work at the moment. I just opened an issue for it #2230.

It'd be cool to be able to pass the folder to ng build directly as well, although it's less important if outDir works.

@bootrider
Copy link
Author

@Meligy it is possible to pass the folder to the command ng build, using the -o parameter

@Meligy
Copy link
Contributor

Meligy commented Sep 20, 2016

Oh. In that case, the outDir should be the permanent way then, which is now broken as tracked by #2230.

A temporary workaround would be adding the whole command to npm scripts in package.json.

@filipesilva
Copy link
Contributor

Dupe of #2006

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants