@push-based/nx-verdaccio
v0.0.6
Published
Nx plugin for blazing fast Verdaccio setup & testing
Readme
@push-based/nx-verdaccio
🔌 Plugins
Verdaccio Test Environment Plugin
Add dynamic targets to generate Verdaccion environments for other tasks, e.g. testing.
See nx-verdaccio plugin docs for details
Executor
Setup Environment Executor
This executor helps to initiate an environment folder and installs it's dependent projects.
// project.json
{
"name": "my-project",
"targets": {
"nxv-env-setup": {
"executor": "@code-pushup/nx-verdaccio:env-setup",
"options": {
"skipInstall": true,
"keepServerRunning": true,
"environmentRoot": "/tmp/test-npm-workspace"
}
}
}
}Read more under setup executor docs.
Bootstrap Environment Executor
This executor helps to initiate environment into a given folder.
// project.json
{
"name": "my-project",
"targets": {
"nxv-env-bootstrap": {
"executor": "@code-pushup/nx-verdaccio:env-bootstrap",
"options": {
"keepServerRunning": false,
"environmentRoot": "/tmp/test-npm-workspace",
"verbose": true
}
}
}
}Read more under bootstrap executor docs.
Kill Process Executor
This executor helps to kill processes by ProcessID or a JSON file containing a property pid as number.
// project.json
{
"name": "my-project",
"targets": {
"nxv-kill-process": {
"executor": "@push-based/nx-verdaccio:kill-process",
"options": {
"pid": "42312",
"filePath": "/tmp/test-npm-workspace/process-id.json",
"verbose": true
}
}
}
}Read more under kill-process executor docs.
NPM Install Executor
This executor helps to install a publishable projects into a given environment folder.
In project.json:
{
"name": "my-project",
"targets": {
"nxv-pkg-install": {
"executor": "@code-pushup/nx-verdaccio:pkg-install",
"options": {
"pkgVersion": "1.2.3",
"environmentRoot": "/tmp/test-npm-workspace",
"verbose": true
}
}
}
}Read more under pkg install executor docs.
NPM Publish Executor
This executor helps to publish a publishable projects into a given environment folder.
In project.json:
{
"name": "my-project",
"targets": {
"nxv-pkg-publish": {
"executor": "@code-pushup/nx-verdaccio:pkg-publish",
"options": {
"pkgVersion": "1.2.3",
"environmentRoot": "/tmp/test-npm-workspace",
"verbose": true
}
}
}
}Read more under pkg publish executor docs.
Debugging e2e environments
Debug full environment in 1 setup:
nx run utils-e2e:env-setup- setup environment forutils-e2enx run utils-e2e:env-setup --keepServerRunning- keeps Verdaccio running after setupnx run utils-e2e:env-cleanup- stops the Verdaccio server forutils-e2efolder and cleans up files
Debug full environment in 2 steps:
nx run utils-e2e:bootstrap-env- setup folders and starts Verdaccio forutils-e2enx run utils-e2e:install-env- bootstraps and installs all dependencies forutils-e2enx run utils-e2e:stop-verdaccio- stops the Verdaccio server forutils-e2e
Debug packages:
nx run utils-e2e:bootstrap-env- setup folders and starts Verdaccio forutils-e2enx run utils:pkg-publish --envProject utils-e2e- publishesutilsandmodelsto the Verdaccio registry configured forutils-e2enx run utils:pkg-install --envProject utils-e2e- installsutilsandmodelsfrom the Verdaccio registry configured forutils-e2enx run utils-e2e:stop-verdaccio- stops the Verdaccio server forutils-e2e
