fix(nx): extend @nrwl/workspace collection and cleanup inconsistencies
This commit is contained in:
parent
d73c10ae54
commit
ff729156b3
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "nx/angular",
|
"name": "nx/angular",
|
||||||
"version": "0.1",
|
"version": "0.1",
|
||||||
"extends": ["@schematics/angular"],
|
"extends": ["@schematics/angular", "@nrwl/workspace"],
|
||||||
"schematics": {
|
"schematics": {
|
||||||
"ng-add": {
|
"ng-add": {
|
||||||
"factory": "./src/schematics/ng-add/ng-add",
|
"factory": "./src/schematics/ng-add/ng-add",
|
||||||
|
|||||||
@ -55,10 +55,18 @@
|
|||||||
"type": "list",
|
"type": "list",
|
||||||
"items": [
|
"items": [
|
||||||
{ "value": "css", "label": "CSS" },
|
{ "value": "css", "label": "CSS" },
|
||||||
{ "value": "scss", "label": "SCSS [ http://sass-lang.com ]" },
|
{
|
||||||
{ "value": "sass", "label": "SASS [ http://sass-lang.com ]" },
|
"value": "scss",
|
||||||
{ "value": "less", "label": "LESS [ http://lesscss.org ]" },
|
"label": "SASS(.scss) [ http://sass-lang.com ]"
|
||||||
{ "value": "styl", "label": "Stylus [ http://stylus-lang.com ]" }
|
},
|
||||||
|
{
|
||||||
|
"value": "styl",
|
||||||
|
"label": "Stylus(.styl)[ http://stylus-lang.com ]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "less",
|
||||||
|
"label": "LESS [ http://lesscss.org ]"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "nx/express",
|
"name": "nx/express",
|
||||||
"version": "0.1",
|
"version": "0.1",
|
||||||
|
"extends": ["@nrwl/workspace"],
|
||||||
"schematics": {
|
"schematics": {
|
||||||
"ng-add": {
|
"ng-add": {
|
||||||
"factory": "./src/schematics/ng-add/ng-add",
|
"factory": "./src/schematics/ng-add/ng-add",
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "nx/nest",
|
"name": "nx/nest",
|
||||||
"version": "0.1",
|
"version": "0.1",
|
||||||
|
"extends": ["@nrwl/workspace"],
|
||||||
"schematics": {
|
"schematics": {
|
||||||
"ng-add": {
|
"ng-add": {
|
||||||
"factory": "./src/schematics/ng-add/ng-add",
|
"factory": "./src/schematics/ng-add/ng-add",
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "nx/node",
|
"name": "nx/node",
|
||||||
"version": "0.1",
|
"version": "0.1",
|
||||||
|
"extends": ["@nrwl/workspace"],
|
||||||
"schematics": {
|
"schematics": {
|
||||||
"ng-add": {
|
"ng-add": {
|
||||||
"factory": "./src/schematics/ng-add/ng-add",
|
"factory": "./src/schematics/ng-add/ng-add",
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "nx/react",
|
"name": "nx/react",
|
||||||
"version": "0.1",
|
"version": "0.1",
|
||||||
|
"extends": ["@nrwl/workspace"],
|
||||||
"schematics": {
|
"schematics": {
|
||||||
"ng-add": {
|
"ng-add": {
|
||||||
"factory": "./src/schematics/ng-add/ng-add",
|
"factory": "./src/schematics/ng-add/ng-add",
|
||||||
|
|||||||
@ -27,10 +27,18 @@
|
|||||||
"type": "list",
|
"type": "list",
|
||||||
"items": [
|
"items": [
|
||||||
{ "value": "css", "label": "CSS" },
|
{ "value": "css", "label": "CSS" },
|
||||||
{ "value": "scss", "label": "SCSS [ http://sass-lang.com ]" },
|
{
|
||||||
{ "value": "sass", "label": "SASS [ http://sass-lang.com ]" },
|
"value": "scss",
|
||||||
{ "value": "less", "label": "LESS [ http://lesscss.org ]" },
|
"label": "SASS(.scss) [ http://sass-lang.com ]"
|
||||||
{ "value": "styl", "label": "Stylus [ http://stylus-lang.com ]" }
|
},
|
||||||
|
{
|
||||||
|
"value": "styl",
|
||||||
|
"label": "Stylus(.styl)[ http://stylus-lang.com ]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "less",
|
||||||
|
"label": "LESS [ http://lesscss.org ]"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "nx/web",
|
"name": "nx/web",
|
||||||
"version": "0.1",
|
"version": "0.1",
|
||||||
|
"extends": ["@nrwl/workspace"],
|
||||||
"schematics": {
|
"schematics": {
|
||||||
"ng-add": {
|
"ng-add": {
|
||||||
"factory": "./src/schematics/ng-add/ng-add",
|
"factory": "./src/schematics/ng-add/ng-add",
|
||||||
|
|||||||
@ -26,7 +26,8 @@
|
|||||||
"ng-new": {
|
"ng-new": {
|
||||||
"factory": "./src/schematics/ng-new/ng-new",
|
"factory": "./src/schematics/ng-new/ng-new",
|
||||||
"schema": "./src/schematics/ng-new/schema.json",
|
"schema": "./src/schematics/ng-new/schema.json",
|
||||||
"description": "Create a workspace"
|
"description": "Create a workspace",
|
||||||
|
"hidden": true
|
||||||
},
|
},
|
||||||
|
|
||||||
"library": {
|
"library": {
|
||||||
|
|||||||
@ -211,18 +211,6 @@ describe('lib', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('--style scss', () => {
|
|
||||||
it('should use scss for styles', async () => {
|
|
||||||
const result = await runSchematic(
|
|
||||||
'lib',
|
|
||||||
{ name: 'myLib', style: 'scss' },
|
|
||||||
appTree
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(result.exists('libs/my-lib/src/lib/my-lib.scss'));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('--unit-test-runner none', () => {
|
describe('--unit-test-runner none', () => {
|
||||||
it('should not generate test configuration', async () => {
|
it('should not generate test configuration', async () => {
|
||||||
const resultTree = await runSchematic(
|
const resultTree = await runSchematic(
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import { Framework } from '../../utils/framework';
|
|||||||
export interface Schema {
|
export interface Schema {
|
||||||
name: string;
|
name: string;
|
||||||
directory?: string;
|
directory?: string;
|
||||||
style?: string;
|
|
||||||
skipTsConfig: boolean;
|
skipTsConfig: boolean;
|
||||||
skipFormat: boolean;
|
skipFormat: boolean;
|
||||||
tags?: string;
|
tags?: string;
|
||||||
|
|||||||
@ -18,22 +18,6 @@
|
|||||||
"description": "A directory where the app is placed",
|
"description": "A directory where the app is placed",
|
||||||
"x-prompt": "In which directory should the library be generated?"
|
"x-prompt": "In which directory should the library be generated?"
|
||||||
},
|
},
|
||||||
"style": {
|
|
||||||
"description": "The file extension to be used for style files.",
|
|
||||||
"type": "string",
|
|
||||||
"default": "css",
|
|
||||||
"x-prompt": {
|
|
||||||
"message": "Which stylesheet format would you like to use?",
|
|
||||||
"type": "list",
|
|
||||||
"items": [
|
|
||||||
{ "value": "css", "label": "CSS" },
|
|
||||||
{ "value": "scss", "label": "SCSS [ http://sass-lang.com ]" },
|
|
||||||
{ "value": "sass", "label": "SASS [ http://sass-lang.com ]" },
|
|
||||||
{ "value": "less", "label": "LESS [ http://lesscss.org ]" },
|
|
||||||
{ "value": "styl", "label": "Stylus [ http://stylus-lang.com ]" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"unitTestRunner": {
|
"unitTestRunner": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["jest", "none"],
|
"enum": ["jest", "none"],
|
||||||
|
|||||||
@ -7,8 +7,7 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"npmScope": {
|
"npmScope": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Npm scope for importing libs.",
|
"description": "Npm scope for importing libs."
|
||||||
"x-prompt": "What is the npm scope you would like to use for your Nx Workspace?"
|
|
||||||
},
|
},
|
||||||
"skipInstall": {
|
"skipInstall": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
|||||||
@ -23,10 +23,18 @@
|
|||||||
"type": "list",
|
"type": "list",
|
||||||
"items": [
|
"items": [
|
||||||
{ "value": "css", "label": "CSS" },
|
{ "value": "css", "label": "CSS" },
|
||||||
{ "value": "scss", "label": "SCSS [ http://sass-lang.com ]" },
|
{
|
||||||
{ "value": "sass", "label": "SASS [ http://sass-lang.com ]" },
|
"value": "scss",
|
||||||
{ "value": "less", "label": "LESS [ http://lesscss.org ]" },
|
"label": "SASS(.scss) [ http://sass-lang.com ]"
|
||||||
{ "value": "styl", "label": "Stylus [ http://stylus-lang.com ]" }
|
},
|
||||||
|
{
|
||||||
|
"value": "styl",
|
||||||
|
"label": "Stylus(.styl)[ http://stylus-lang.com ]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "less",
|
||||||
|
"label": "LESS [ http://lesscss.org ]"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -25,10 +25,18 @@
|
|||||||
"type": "list",
|
"type": "list",
|
||||||
"items": [
|
"items": [
|
||||||
{ "value": "css", "label": "CSS" },
|
{ "value": "css", "label": "CSS" },
|
||||||
{ "value": "scss", "label": "SCSS [ http://sass-lang.com ]" },
|
{
|
||||||
{ "value": "sass", "label": "SASS [ http://sass-lang.com ]" },
|
"value": "scss",
|
||||||
{ "value": "less", "label": "LESS [ http://lesscss.org ]" },
|
"label": "SASS(.scss) [ http://sass-lang.com ]"
|
||||||
{ "value": "styl", "label": "Stylus [ http://stylus-lang.com ]" }
|
},
|
||||||
|
{
|
||||||
|
"value": "styl",
|
||||||
|
"label": "Stylus(.styl)[ http://stylus-lang.com ]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "less",
|
||||||
|
"label": "LESS [ http://lesscss.org ]"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,10 +23,18 @@
|
|||||||
"type": "list",
|
"type": "list",
|
||||||
"items": [
|
"items": [
|
||||||
{ "value": "css", "label": "CSS" },
|
{ "value": "css", "label": "CSS" },
|
||||||
{ "value": "scss", "label": "SCSS [ http://sass-lang.com ]" },
|
{
|
||||||
{ "value": "sass", "label": "SASS [ http://sass-lang.com ]" },
|
"value": "scss",
|
||||||
{ "value": "less", "label": "LESS [ http://lesscss.org ]" },
|
"label": "SASS(.scss) [ http://sass-lang.com ]"
|
||||||
{ "value": "styl", "label": "Stylus [ http://stylus-lang.com ]" }
|
},
|
||||||
|
{
|
||||||
|
"value": "styl",
|
||||||
|
"label": "Stylus(.styl)[ http://stylus-lang.com ]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "less",
|
||||||
|
"label": "LESS [ http://lesscss.org ]"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user