This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
projects: [ | |
'<rootDir>/apps/products', | |
'<rootDir>/apps/cart', | |
'<rootDir>/libs/shared/product/ui', | |
'<rootDir>/libs/products/home-page', | |
'<rootDir>/libs/cart/cart-page', | |
'<rootDir>/libs/shared/cart/state', | |
'<rootDir>/libs/shared/product/state', | |
'<rootDir>/libs/shared/header', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | |
"version": 1, | |
"newProjectRoot": "projects", | |
"projects": { | |
"ngapp": { | |
"projectType": "application", | |
"schematics": {}, | |
"root": "", | |
"sourceRoot": "src", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface Schema { | |
// The name of the service. | |
name: string; | |
// The path to create the service. | |
path?: string; | |
// The name of the project. | |
project?: string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/schema", | |
"id": "SchematicsMySchematic", | |
"title": "My Schematic Schema", | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string", | |
"description": "Service name", | |
"$default": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const mySchematic = convertNxGenerator(mySchematicGenerator); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/schema", | |
"id": "SchematicsMySchematic", | |
"title": "My Schematic Schema", | |
"type": "object", | |
"properties": { | |
}, | |
"required": [] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
"baseUrl": ".", | |
"lib": [ | |
"es2018", | |
"dom" | |
], | |
"declaration": true, | |
"module": "commonjs", | |
"moduleResolution": "node", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "my-lib", | |
"version": "0.0.1", | |
"scripts": { | |
"prebuild": "../../node_modules/.bin/rimraf dist/my-lib && mkdir -p ../../dist/my-lib/schematics && cp -R schematics/ ../../dist/my-lib/schematics/", | |
"build": "../../node_modules/.bin/tsc -p tsconfig.schematics.json", | |
"postbuild": "../../node_modules/.bin/rimraf --glob ../../dist/my-lib/schematics/**/*.ts" | |
}, | |
"peerDependencies": { | |
"@angular/common": "^12.0.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json", | |
"schematics": { | |
"my-schematic": { | |
"description": "Generate a service in the project.", | |
"factory": "./my-schematic/index#mySchematic", | |
"schema": "./my-schematic/schema.json" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Tree, convertNxGenerator } from '@nrwl/devkit'; | |
export function mySchematicGenerator(_tree: Tree, opts: any) { | |
console.log('options', opts); | |
} |