Skip to content

Commit

Permalink
Merge branch 'nx-release' into update-lab-1
Browse files Browse the repository at this point in the history
  • Loading branch information
llwt committed Sep 11, 2024
2 parents 67ae5af + 174de51 commit ae4f9bd
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 43 deletions.
10 changes: 2 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,12 @@
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
"rules": {}
}
]
}
33 changes: 33 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Contributing

`TODO`

## Local Package Publishing

When iterating on the `@nrwl/nx-workshop-e2e` package, it's often helpful to test out a published
version of the package locally. This can be done by starting the local registry, `verdaccio`, and using the `nx release` command.

To start the local registry, run the `local-registry` target for the root workspace project:

```bash
nx local-registry
```

In another terminal, you can then trigger deployment to that registry by running the `release` target for the `nx-workshop-e2e` project:

```bash
nx release version prerelease && nx release publish

# alternatively
nx release-dev nx-react-workshop
```

Once your dev version has been published, you can then update the `nx-workshop-e2e` package in your consuming project to the version you just published.

Since verdaccio configures itself in the `~/.npmrc` file, you can simply install using your standard package manager commands:

```bash
npm add --save-dev @nrwl/nx-react-workshop@latest
# or alternatively with yarn
yarn add -D @nrwl/nx-react-workshop@latest
```
2 changes: 1 addition & 1 deletion libs/nx-react-workshop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nrwl/nx-react-workshop",
"version": "0.2.1",
"version": "0.0.0",
"main": "src/index.js",
"generators": "./generators.json",
"executors": "./executors.json",
Expand Down
10 changes: 2 additions & 8 deletions libs/nx-react-workshop/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,8 @@
"updateBuildableProjectDepsInPackageJson": true
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"commands": [
"yarn nx build nx-react-workshop",
"yarn publish dist/libs/nx-react-workshop"
]
}
"release-dev": {
"command": "nx release version prerelease && nx release publish"
}
}
}
15 changes: 15 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
"@nx/eslint:lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"cache": true
},
"nx-release-publish": {
"options": {
"packageRoot": "dist/libs/{projectName}"
}
}
},
"namedInputs": {
Expand All @@ -38,6 +43,16 @@
"!{projectRoot}/tsconfig.storybook.json"
]
},
"release": {
"projects": ["nx-react-workshop"],
"version": {
"preVersionCommand": "nx build nx-react-workshop",
"generatorOptions": {
"packageRoot": "dist/libs/{projectName}",
"currentVersionResolver": "registry"
}
}
},
"nxCloudAccessToken": "NzdhYTRjNmQtNGYwMC00MGE0LTk2YzEtNWFlNGU1MDk3OTczfHJlYWQtd3JpdGU=",
"nxCloudUrl": "https://staging.nx.app",
"useInferencePlugins": false,
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"version": "0.0.0",
"license": "MIT",
"scripts": {
"nx": "nx",
"local-release": "ts-node -P ./scripts/tsconfig.release.json ./scripts/local-release"
"nx": "nx"
},
"private": true,
"dependencies": {
Expand Down
15 changes: 0 additions & 15 deletions scripts/local-release.ts

This file was deleted.

9 changes: 0 additions & 9 deletions scripts/tsconfig.release.json

This file was deleted.

0 comments on commit ae4f9bd

Please sign in to comment.