x)- [x] bug report -> please search issues before submitting
- [ ] feature request
x)- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
node: 10
npm: 6
cli: 7.0.6
os: linux
issue a command to build a library with output-path flag
ng build my-lib --output-path=dist
Unknown option: '--output-path'
build command should accept custom output path for libs
Hi, the output path for library needs to be specified in the ng-package.json One of the reasons why this is not an option is because when changing the output path you鈥檇 need to change the path mappings in root tsconfig as otherwise you won鈥檛 be able to consume the library within the workspace.
Can you explain why you need to provide the output from the command line ?
Hi, Ill try to explain my use case.
Mostly I need to have the same CI files for all library projects (ie: always outputting the artifacts to the same folder name, dist instead of dist/lib-1-name, so the CI runners always know where to look without me telling them what the name of the project to handle is).
I understand that the library is a separate workspace, so needs to be outputted in a separate folder, but I don't use the monorepo way of managing projects. Most of us don't, actually. In my use case, one lib is one NG CLI project, and the app section of the angular cli project is used as a playground/demo/e2e-test section for the lib (it's not a potential output of the project).
But you're right, I could change the ng-package.json for each project, and it would work. So you can close the issue if you feel like the flag would be useless/impossible to implement.
Thanks
@avatsaev The build-ng-packagr schema just doesn't support other properties than project, tsConfig and watch.
{
"title": "ng-packagr Target",
"description": "ng-packagr target options for Build Architect.",
"type": "object",
"properties": {
"project": {
"type": "string",
"description": "The file path of the package.json for distribution via npm."
},
"tsConfig": {
"type": "string",
"description": "The file path of the TypeScript configuration file."
},
"watch": {
"type": "boolean",
"description": "Run build when files change.",
"default": false
}
},
"additionalProperties": false,
"required": [
"project"
]
}
I understand, thank you for the explanation
But separating app build and lib build options in docs and --help screen would've made it clear without me having to open an issue.
Closing
Kindly subscribe to https://github.com/angular/angular/issues/26569
Hi,
This is driving my nuts. Since I have updated my project to angular 8, the dist folder gets deleted before a production build. The library is symlink from this dist folder. My project fails to build because it keeps deleting the folder because it is missing the library. Possibly my setup is wrong, can anybody point me the right direction?
Cheers
Olaf
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._
Most helpful comment
Kindly subscribe to https://github.com/angular/angular/issues/26569