Reputation: 67
I have an issue and didn't find how to solve it. I would like to build an angular library with angular 7 using angular/cli 8. I don't know if it is even possible to do that.
In my company we have many angular apps, and they can't have anytime the same angular version. For instance, some are angular 7 app, other angular 8. I have a library, which will be used by angular 7, angular 8, ... apps. This library will be build by a ci pipeline (jenkins) and push to my nexus repository.
Is there a way with jenkins to build the library for angular 7 and 8 ? (without uninstalling angular 8 and installing angular 7 again and again) ?
Thanks for any help !
Upvotes: 1
Views: 99
Reputation: 758
If you use npx
, you can specify the correct cli for each app.
e.g.
npx ng build
This avoids using a global cli install and utilizes the version installed in the project's devDependencies
.
Here are the docs regarding the npx
command https://www.npmjs.com/package/npx
Upvotes: 1