fix(js): add init generator placeholder (#9777)
This commit is contained in:
parent
2fe18186c7
commit
3e94d4cb3a
@ -128,6 +128,24 @@
|
||||
"hidden": false,
|
||||
"path": "/packages/js/src/generators/library/schema.json"
|
||||
},
|
||||
{
|
||||
"name": "init",
|
||||
"factory": "./src/generators/init/init#initGenerator",
|
||||
"schema": {
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"$id": "NxTypescriptInit",
|
||||
"cli": "nx",
|
||||
"title": "Init nrwl/js",
|
||||
"description": "Init generator placeholder for nrwl/js",
|
||||
"presets": []
|
||||
},
|
||||
"aliases": ["lib"],
|
||||
"x-type": "init",
|
||||
"description": "Init placeholder.",
|
||||
"implementation": "/packages/js/src/generators/init/init#initGenerator.ts",
|
||||
"hidden": false,
|
||||
"path": "/packages/js/src/generators/init/schema.json"
|
||||
},
|
||||
{
|
||||
"name": "convert-to-swc",
|
||||
"factory": "./src/generators/convert-to-swc/convert-to-swc#convertToSwcGenerator",
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
"path": "generated/packages/js.json",
|
||||
"schemas": {
|
||||
"executors": ["tsc", "swc"],
|
||||
"generators": ["library", "convert-to-swc"]
|
||||
"generators": ["library", "init", "convert-to-swc"]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -9,6 +9,13 @@
|
||||
"x-type": "library",
|
||||
"description": "Create a library."
|
||||
},
|
||||
"init": {
|
||||
"factory": "./src/generators/init/init#initSchematic",
|
||||
"schema": "./src/generators/init/schema.json",
|
||||
"aliases": ["lib"],
|
||||
"x-type": "init",
|
||||
"description": "Init placeholder."
|
||||
},
|
||||
"convert-to-swc": {
|
||||
"factory": "./src/generators/convert-to-swc/convert-to-swc#convertToSwcSchematic",
|
||||
"schema": "./src/generators/convert-to-swc/schema.json",
|
||||
@ -25,6 +32,13 @@
|
||||
"x-type": "library",
|
||||
"description": "Create a library"
|
||||
},
|
||||
"init": {
|
||||
"factory": "./src/generators/init/init#initGenerator",
|
||||
"schema": "./src/generators/init/schema.json",
|
||||
"aliases": ["lib"],
|
||||
"x-type": "init",
|
||||
"description": "Init placeholder."
|
||||
},
|
||||
"convert-to-swc": {
|
||||
"factory": "./src/generators/convert-to-swc/convert-to-swc#convertToSwcGenerator",
|
||||
"schema": "./src/generators/convert-to-swc/schema.json",
|
||||
|
||||
10
packages/js/src/generators/init/init.ts
Normal file
10
packages/js/src/generators/init/init.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { convertNxGenerator, logger } from '@nrwl/devkit';
|
||||
|
||||
export async function initGenerator() {
|
||||
logger.info(
|
||||
'This is a placeholder for @nrwl/js:init generator. If you want to create a library, use @nrwl/js:lib instead'
|
||||
);
|
||||
}
|
||||
|
||||
export default initGenerator;
|
||||
export const initSchematic = convertNxGenerator(initGenerator);
|
||||
7
packages/js/src/generators/init/schema.json
Normal file
7
packages/js/src/generators/init/schema.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"$id": "NxTypescriptInit",
|
||||
"cli": "nx",
|
||||
"title": "Init nrwl/js",
|
||||
"description": "Init generator placeholder for nrwl/js"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user