refactor(schematics): add all schematics into the collection dir
This commit is contained in:
parent
808f433fc5
commit
048448eba2
@ -1,6 +1,7 @@
|
||||
import { execSync } from 'child_process';
|
||||
import { readFileSync, statSync, writeFileSync } from 'fs';
|
||||
import * as path from 'path';
|
||||
import {exitCodeFromResult} from '@angular/compiler-cli';
|
||||
|
||||
const projectName: string = 'proj';
|
||||
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
export { addImportToModule, addProviderToModule, insert } from './src/utility/ast-utils';
|
||||
export { names, toClassName, toFileName, toPropertyName } from './src/utility/name-utils';
|
||||
export { addImportToModule, addProviderToModule, insert } from './src/collection/utility/ast-utils';
|
||||
export { names, toClassName, toFileName, toPropertyName } from './src/collection/utility/name-utils';
|
||||
|
||||
@ -3,44 +3,44 @@
|
||||
"version": "0.1",
|
||||
"schematics": {
|
||||
"workspace": {
|
||||
"factory": "./workspace",
|
||||
"schema": "./workspace/schema.json",
|
||||
"factory": "./collection/workspace",
|
||||
"schema": "./collection/workspace/schema.json",
|
||||
"description": "Convert an existing CLI project into an Nx Workspace"
|
||||
},
|
||||
|
||||
"application": {
|
||||
"factory": "./application",
|
||||
"schema": "./application/schema.json",
|
||||
"factory": "./collection/application",
|
||||
"schema": "./collection/application/schema.json",
|
||||
"description": "Create an empty workspace"
|
||||
},
|
||||
|
||||
"app": {
|
||||
"factory": "./app",
|
||||
"schema": "./app/schema.json",
|
||||
"factory": "./collection/app",
|
||||
"schema": "./collection/app/schema.json",
|
||||
"description": "Create an application"
|
||||
},
|
||||
|
||||
"lib": {
|
||||
"factory": "./lib",
|
||||
"schema": "./lib/schema.json",
|
||||
"factory": "./collection/lib",
|
||||
"schema": "./collection/lib/schema.json",
|
||||
"description": "Create a library"
|
||||
},
|
||||
|
||||
"ngrx": {
|
||||
"factory": "./ngrx",
|
||||
"schema": "./ngrx/schema.json",
|
||||
"factory": "./collection/ngrx",
|
||||
"schema": "./collection/ngrx/schema.json",
|
||||
"description": "Add NgRx support to a module"
|
||||
},
|
||||
|
||||
"upgrade-module": {
|
||||
"factory": "./upgrade-module",
|
||||
"schema": "./upgrade-module/schema.json",
|
||||
"factory": "./collection/upgrade-module",
|
||||
"schema": "./collection/upgrade-module/schema.json",
|
||||
"description": "Generates UpgradeModule setup"
|
||||
},
|
||||
|
||||
"downgrade-module": {
|
||||
"factory": "./downgrade-module",
|
||||
"schema": "./downgrade-module/schema.json",
|
||||
"factory": "./collection/downgrade-module",
|
||||
"schema": "./collection/downgrade-module/schema.json",
|
||||
"description": "Generates downgradeModule setup"
|
||||
},
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import { createEmptyWorkspace } from '../testing-utils';
|
||||
import { getFileContent } from '@schematics/angular/utility/test';
|
||||
|
||||
describe('app', () => {
|
||||
const schematicRunner = new SchematicTestRunner('@nrwl/schematics', path.join(__dirname, '../collection.json'));
|
||||
const schematicRunner = new SchematicTestRunner('@nrwl/schematics', path.join(__dirname, '../../collection.json'));
|
||||
|
||||
let appTree: Tree;
|
||||
|
||||
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
@ -5,7 +5,7 @@ import { createEmptyWorkspace } from '../testing-utils';
|
||||
import { getFileContent } from '@schematics/angular/utility/test';
|
||||
|
||||
describe('application', () => {
|
||||
const schematicRunner = new SchematicTestRunner('@nrwl/schematics', path.join(__dirname, '../collection.json'));
|
||||
const schematicRunner = new SchematicTestRunner('@nrwl/schematics', path.join(__dirname, '../../collection.json'));
|
||||
|
||||
let appTree: Tree;
|
||||
|
||||
@ -5,7 +5,7 @@ import { createApp, createEmptyWorkspace } from '../testing-utils';
|
||||
import { getFileContent } from '@schematics/angular/utility/test';
|
||||
|
||||
describe('downgrade-module', () => {
|
||||
const schematicRunner = new SchematicTestRunner('@nrwl/schematics', path.join(__dirname, '../collection.json'));
|
||||
const schematicRunner = new SchematicTestRunner('@nrwl/schematics', path.join(__dirname, '../../collection.json'));
|
||||
|
||||
let appTree: Tree;
|
||||
|
||||
@ -5,7 +5,7 @@ import { createApp, createEmptyWorkspace } from '../testing-utils';
|
||||
import { getFileContent } from '@schematics/angular/utility/test';
|
||||
|
||||
describe('lib', () => {
|
||||
const schematicRunner = new SchematicTestRunner('@nrwl/schematics', path.join(__dirname, '../collection.json'));
|
||||
const schematicRunner = new SchematicTestRunner('@nrwl/schematics', path.join(__dirname, '../../collection.json'));
|
||||
|
||||
let appTree: Tree;
|
||||
|
||||
@ -5,7 +5,7 @@ import { createApp, createEmptyWorkspace } from '../testing-utils';
|
||||
import { getFileContent } from '@schematics/angular/utility/test';
|
||||
|
||||
describe('ngrx', () => {
|
||||
const schematicRunner = new SchematicTestRunner('@nrwl/schematics', path.join(__dirname, '../collection.json'));
|
||||
const schematicRunner = new SchematicTestRunner('@nrwl/schematics', path.join(__dirname, '../../collection.json'));
|
||||
|
||||
let appTree: Tree;
|
||||
|
||||
@ -5,7 +5,7 @@ import { createApp, createEmptyWorkspace } from '../testing-utils';
|
||||
import { getFileContent } from '@schematics/angular/utility/test';
|
||||
|
||||
describe('upgrade-module', () => {
|
||||
const schematicRunner = new SchematicTestRunner('@nrwl/schematics', path.join(__dirname, '../collection.json'));
|
||||
const schematicRunner = new SchematicTestRunner('@nrwl/schematics', path.join(__dirname, '../../collection.json'));
|
||||
|
||||
let appTree: Tree;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user