Skip to content

Commit

Permalink
fix(core): remove orphaned publish-local (#611)
Browse files Browse the repository at this point in the history
- add steps for using sandbox in CONTRIBUTING.MD

Co-authored-by: Chris Leigh <chris.leigh@sbdinc.com>
  • Loading branch information
Tungsten78 and Chris Leigh authored Feb 3, 2023
1 parent b3856e0 commit 7985e14
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,19 @@ We support the following scopes:

- ci // improvements to the CI / CD pipelines.
- repo // improvements to the general repository.

### Development tips

#### Validating plug-in changes locally

The recommended way to validate your changes is to deploy the plugin locally to a fresh nx workspace.

- A sandbox workspace can be generated via `yarn sandbox`
- This script will build/publish the plugin to a sandbox workspace (./tmp/sandbox)
- Verdaccio is leveraged to start a locally running instance of npm (http://localhost:4872)
- The server will close when the script is stopped
- use `nx generate @nx-dotnet/core:[generator]` to validate your changes manually

#### Unit testing

To validate against the affected tests, use `nx affected:test`
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
"scripts": {
"prepare": "husky install && nx g @nx-dotnet/core:restore",
"lint-staged": "lint-staged",
"publish-dev": "ts-node tools/scripts/publish-dev",
"e2e": "ts-node -P ./tools/scripts/tsconfig.e2e.json ./tools/scripts/e2e.ts",
"publish-local": "cp .npmrc.local .npmrc && run-p \"rimraf tmp\" e2e-registry \"ts-node ./tools/scripts/publish-all 99.99.99 local\"",
"semantic-release": "semantic-release",
"ts-node": "ts-node",
"rimraf": "rimraf",
"preinstall": "node ./tools/scripts/hooks/preinstall.js",
"documentation:check": "ts-node ./tools/scripts/hooks/documentation.check.ts",
"documentation": "nx g @nx-dotnet/nxdoc:generate-docs",
"publish-dev": "ts-node tools/scripts/publish-dev",
"sandbox": "ts-node ./tools/scripts/sandbox.ts"
},
"private": false,
Expand Down
2 changes: 1 addition & 1 deletion tools/scripts/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (require.main === module) {
}
ensureDirSync(dirname(sandboxDirectory));
execSync(
`yarn create nx-workspace@latest ${basename(
`npx create-nx-workspace@latest ${basename(
sandboxDirectory,
)} --preset empty --no-nxCloud --packageManager yarn`,
{
Expand Down

0 comments on commit 7985e14

Please sign in to comment.