Skip to content

ng build - allow execution of Angular commands in custom directory #14248

@PyroGenesis

Description

@PyroGenesis

🚀 Feature request

Command (mark with an x)

- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Description

I would like to have the ability to run ng commands (specifically: ng build --prod) from outside of the Angular root folder. This is so that I could run build and serve commands for my Angular project using a script located in a different directory.

Describe the solution you'd like

Something akin to the --prefix argument of the npm command would be just perfect.

Describe alternatives you've considered

My current workaround is to have the ng command as a npm shortcut (using the script property in package.json) and then run it as:

npm run NPM_SHORTCUT --prefix path\to\Angular\project

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: @angular/clifeatureIssue that requests a new featurefeature: insufficient votesLabel to add when the not a sufficient number of votes or comments from unique authors

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions