How can I run a nx plugi…
How can I run a nx-plugin that I’ve created in my workspace without publishing it?
Responses:
I know in the nx plugin guide on nx.dev they mention it
I don’t have the link right now though.
Without reading the guide… npm link or set the version string in your package.json to the path of the dist folder of your plugin
Fast way is you can run the e2e test and go to the tmp/nx-plugin/proj folder
I want to make this plugin available to my team, I was hoping to avoid publishing since is only useful for my team.
did you figure out this issue? What was the missing piece?
still did not figured it out. I’m creating a slightly modified schematic for cypress project that matches my workspace. And I’m not interested in publishing it. However I did not find how to run a plugin existing in the workspace.
Hey Matt, I was able to accomplish this last night. Let’s say you generated a plugin in your workspace (it would theoretically go into /libs) let’s all it plugin1
Then do, nx build plugin1
And then all you need to do is
yarn nx g ./dist/libs/plugin1:<schematic> [options]
That make sense? This is assuming defaults paths and such are left when generating with Nrwl/nx-plugin
Yeah makes sense, but then I have either to build the plug-in Everytime I need or to commit the dist folder to my git repo, right?
I guess I just thought it was simpler to create customized scaffolding to fit our needs. I don’t want to publish a package for each one or persist built code on the repo. I believe would not be ideal