Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Commit

Permalink
feat(core): init three generator
Browse files Browse the repository at this point in the history
  • Loading branch information
nartc committed Nov 29, 2021
1 parent 7adf33d commit bf1c6b2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@angular/language-service": "~13.0.2",
"@nrwl/angular": "13.2.3",
"@nrwl/cli": "13.2.3",
"@nrwl/devkit": "13.2.3",
"@nrwl/eslint-plugin-nx": "13.2.3",
"@nrwl/jest": "13.2.3",
"@nrwl/linter": "13.2.3",
Expand Down
10 changes: 10 additions & 0 deletions tools/generators/three/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Tree, formatFiles, installPackagesTask } from '@nrwl/devkit';
import { libraryGenerator } from '@nrwl/workspace/generators';

export default async function (tree: Tree, schema: any) {
await libraryGenerator(tree, { name: schema.name });
await formatFiles(tree);
return () => {
installPackagesTask(tree);
};
}
17 changes: 17 additions & 0 deletions tools/generators/three/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "three",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Library name",
"$default": {
"$source": "argv",
"index": 0
}
}
},
"required": ["name"]
}

0 comments on commit bf1c6b2

Please sign in to comment.