Skip to content

Commit 7985e14

Browse files
Tungsten78Chris Leigh
andauthored
fix(core): remove orphaned publish-local (#611)
- add steps for using sandbox in CONTRIBUTING.MD Co-authored-by: Chris Leigh <chris.leigh@sbdinc.com>
1 parent b3856e0 commit 7985e14

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,19 @@ We support the following scopes:
4242

4343
- ci // improvements to the CI / CD pipelines.
4444
- repo // improvements to the general repository.
45+
46+
### Development tips
47+
48+
#### Validating plug-in changes locally
49+
50+
The recommended way to validate your changes is to deploy the plugin locally to a fresh nx workspace.
51+
52+
- A sandbox workspace can be generated via `yarn sandbox`
53+
- This script will build/publish the plugin to a sandbox workspace (./tmp/sandbox)
54+
- Verdaccio is leveraged to start a locally running instance of npm (http://localhost:4872)
55+
- The server will close when the script is stopped
56+
- use `nx generate @nx-dotnet/core:[generator]` to validate your changes manually
57+
58+
#### Unit testing
59+
60+
To validate against the affected tests, use `nx affected:test`

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
"scripts": {
55
"prepare": "husky install && nx g @nx-dotnet/core:restore",
66
"lint-staged": "lint-staged",
7-
"publish-dev": "ts-node tools/scripts/publish-dev",
87
"e2e": "ts-node -P ./tools/scripts/tsconfig.e2e.json ./tools/scripts/e2e.ts",
9-
"publish-local": "cp .npmrc.local .npmrc && run-p \"rimraf tmp\" e2e-registry \"ts-node ./tools/scripts/publish-all 99.99.99 local\"",
108
"semantic-release": "semantic-release",
119
"ts-node": "ts-node",
1210
"rimraf": "rimraf",
1311
"preinstall": "node ./tools/scripts/hooks/preinstall.js",
1412
"documentation:check": "ts-node ./tools/scripts/hooks/documentation.check.ts",
1513
"documentation": "nx g @nx-dotnet/nxdoc:generate-docs",
14+
"publish-dev": "ts-node tools/scripts/publish-dev",
1615
"sandbox": "ts-node ./tools/scripts/sandbox.ts"
1716
},
1817
"private": false,

tools/scripts/sandbox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if (require.main === module) {
3535
}
3636
ensureDirSync(dirname(sandboxDirectory));
3737
execSync(
38-
`yarn create nx-workspace@latest ${basename(
38+
`npx create-nx-workspace@latest ${basename(
3939
sandboxDirectory,
4040
)} --preset empty --no-nxCloud --packageManager yarn`,
4141
{

0 commit comments

Comments
 (0)