3

I'm working on creating an automated UI update process for a suite of apps utilizing the Azure DevOps build pipeline and hosted Artifacts. I've already created a npm package (front end assets) and nuget package (razor class library with nested layouts/partials). I would like to consume the NPM package in other projects using the libman.json while utilizing my Azure DevOps Artifacts feed as the provider. Is there an easy answer to this or is another method preferable?

Thanks!

ehance
  • 41
  • 4
  • I don’t think you can currently use LibMan for packages on NPM that aren’t also published to one of the supported CDNs. You may need to use npm directly for that and use a different build process in that case. – poke Sep 13 '18 at 22:09
  • @poke thanks for the reply. I'm going to post an answer with the best alternative I've come up with at the moment so it can be voted on if it's an appropriate direction. – ehance Sep 13 '18 at 22:14
  • Maybe [this answer](https://stackoverflow.com/a/48487588/216074) is useful to you if you are looking for alternatives to LibMan. – poke Sep 13 '18 at 22:17
  • That's certainly not a bad approach. I think I may need to sleep on it... – ehance Sep 13 '18 at 22:33
  • Yeah, personally, I'd say if you're going to utilize NPM, go all the way and use npm-scripts or Gulp/Grunt/Webpack as well. LibMan is like training wheels. Microsoft needed some sort of *simple* replacement for the old Bower integration, but it's really not feature-rich or fully-formed enough to handle anything but the most basic scenarios of "go get me Bootstrap", etc. – Chris Pratt Sep 14 '18 at 17:01

1 Answers1

0

I've found that the filesystem provider option may be of use.

It seems fairly feasible to install/restore the npm package from our azure devops artifact feed during the build pipeline and then use the file-system provider to reference the package and install the assets as desired utilizing the standard libman.json restore process.

ehance
  • 41
  • 4