diff --git a/.verdaccio/config.yml b/.verdaccio/config.yml new file mode 100644 index 00000000..a007fe82 --- /dev/null +++ b/.verdaccio/config.yml @@ -0,0 +1,28 @@ +# path to a directory with all packages +storage: ../tmp/local-registry/storage + +# a list of other known repositories we can talk to +uplinks: + npmjs: + url: https://registry.npmjs.org/ + maxage: 60m + +packages: + '**': + # give all users (including non-authenticated users) full access + # because it is a local registry + access: $all + publish: $all + unpublish: $all + + # if package is not available locally, proxy requests to npm registry + proxy: npmjs + +# log settings +logs: + type: stdout + format: pretty + level: warn + +publish: + allow_offline: true # set offline to true to allow publish offline diff --git a/package.json b/package.json index 48a29a24..845667bd 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,11 @@ "nx": "18.2.4", "prettier": "^2.6.2", "typescript": "~5.4.2", + "verdaccio": "^5.0.4", "vite": "~5.0.0", "vitest": "^1.3.1" + }, + "nx": { + "includedScripts": [] } } diff --git a/project.json b/project.json new file mode 100644 index 00000000..74475435 --- /dev/null +++ b/project.json @@ -0,0 +1,14 @@ +{ + "name": "@nx-verdaccio-e2e-setup/source", + "$schema": "node_modules/nx/schemas/project-schema.json", + "targets": { + "local-registry": { + "executor": "@nx/js:verdaccio", + "options": { + "port": 4873, + "config": ".verdaccio/config.yml", + "storage": "tmp/local-registry/storage" + } + } + } +}