@clipboard-health/nx-plugin 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -18,12 +18,10 @@ npm install @clipboard-health/nx-plugin
|
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Libraries version and publish separately. We use [Nx Local Generators](https://nx.dev/recipes/generators/local-generators) to generate library stubs that successfully build, lint, and test. The `--publishable` flag sets up semantic versioning from commit messages, GitHub Release creation, and NPM publishing on merges to `main` (but only if the code within your library package changed, thanks to Nx's dependency graph).
|
|
21
|
+
Libraries version and publish separately. We use [Nx Local Generators](https://nx.dev/recipes/generators/local-generators) to generate library stubs that successfully build, lint, and test. The `--publishConfigPublicAccess` flag publishes the NPM package publicly.
|
|
24
22
|
|
|
25
23
|
```bash
|
|
26
|
-
# Optionally, include the --
|
|
24
|
+
# Optionally, include the --publishConfigPublicAccess flag.
|
|
27
25
|
npx nx generate @clipboard-health/nx-plugin:node-lib [PROJECT_NAME]
|
|
28
26
|
|
|
29
27
|
# Change your mind? Remove it just as easily...
|
|
@@ -34,6 +32,4 @@ npx nx generate @nx/workspace:remove --projectName [PROJECT_NAME]
|
|
|
34
32
|
npx nx generate @nx/workspace:move --projectName [PROJECT_NAME] --destination [NEW_PROJECT_NAME]
|
|
35
33
|
```
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Follow [Adding new libraries](#adding-new-libraries) to generate a new package and copy the code from the existing library into it.
|
|
35
|
+
To porting an existing library, follow the above to generate a new package and copy the code from the existing library into it.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/nx-plugin",
|
|
3
3
|
"description": "Clipboard Health's Nx plugin contains generators to manage applications within an Nx workspace.",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"bugs": "https://github.com/clipboardhealth/core-utils/issues",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@nx/devkit": "19.5.6",
|
|
@@ -21,6 +21,7 @@ type NormalizedSchema = NxPluginGeneratorSchema & {
|
|
|
21
21
|
projectName: string;
|
|
22
22
|
projectRoot: string;
|
|
23
23
|
projectDirectory: string;
|
|
24
|
+
publishConfigAccess: string;
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
function normalizeOptions(tree: Tree, options: NxPluginGeneratorSchema): NormalizedSchema {
|
|
@@ -28,7 +29,7 @@ function normalizeOptions(tree: Tree, options: NxPluginGeneratorSchema): Normali
|
|
|
28
29
|
const projectDirectory = name;
|
|
29
30
|
return {
|
|
30
31
|
...options,
|
|
31
|
-
|
|
32
|
+
publishConfigAccess: options.publishConfigPublicAccess ? "public" : "restricted",
|
|
32
33
|
importPath: getImportPath(tree, projectDirectory),
|
|
33
34
|
projectName: name.replaceAll("/", "-"),
|
|
34
35
|
projectRoot: `${getWorkspaceLayout(tree).libsDir}/${name}`,
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"x-prompt": "Library name?",
|
|
15
15
|
"pattern": "(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$"
|
|
16
16
|
},
|
|
17
|
-
"
|
|
17
|
+
"publishConfigPublicAccess": {
|
|
18
18
|
"type": "boolean",
|
|
19
19
|
"default": false,
|
|
20
|
-
"description": "
|
|
20
|
+
"description": "Publish the NPM package publicly.",
|
|
21
21
|
"x-priority": "important"
|
|
22
22
|
}
|
|
23
23
|
},
|