Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Building Angular libraries with Piper

benjaminbignell
Associate
Associate
0 Kudos
217

I'm trying to build and publish an Angular component with piper, but it seems that there's no support for the standard Angular workspace configuration when the goal is to publish individual components (monorepo).

The workspace looks something like this:

my-project
-- package.json
-- projects
   -- my-component
      -- package.json

When building, I see messages like the following:

npmExecuteScripts - Discovered package.json file projects/my-component/package.json
npmExecuteScripts - Discovered package.json file package.json
npmExecuteScripts - triggering publish for projects/my-component/package.json
npmExecuteScripts - running command: npm publish --userconfig projects/my-component/.piperNpmrc ---registry https://..
npmExecuteScripts - triggering publish for package.json
npmExecuteScripts - running command: npm publish --userconfig .piperNpmrc --registry https://..

But the final result is that it essentially builds and publishes the root workspace "my-project" twice.

What a "normal" npm build for the project components should look like is:

npm build my-component
cd dist/my-component
npm publish

Is there any way to achieve this with Piper?

0 REPLIES 0