fix(nx): extend @nrwl/workspace collection and cleanup inconsistencies

This commit is contained in:
Jason Jean 2019-05-17 15:50:48 -04:00 committed by Victor Savkin
parent d73c10ae54
commit ff729156b3
16 changed files with 69 additions and 53 deletions

View File

@ -1,7 +1,7 @@
{
"name": "nx/angular",
"version": "0.1",
"extends": ["@schematics/angular"],
"extends": ["@schematics/angular", "@nrwl/workspace"],
"schematics": {
"ng-add": {
"factory": "./src/schematics/ng-add/ng-add",

View File

@ -55,10 +55,18 @@
"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 ]" }
{
"value": "scss",
"label": "SASS(.scss) [ http://sass-lang.com ]"
},
{
"value": "styl",
"label": "Stylus(.styl)[ http://stylus-lang.com ]"
},
{
"value": "less",
"label": "LESS [ http://lesscss.org ]"
}
]
}
},

View File

@ -1,6 +1,7 @@
{
"name": "nx/express",
"version": "0.1",
"extends": ["@nrwl/workspace"],
"schematics": {
"ng-add": {
"factory": "./src/schematics/ng-add/ng-add",

View File

@ -1,6 +1,7 @@
{
"name": "nx/nest",
"version": "0.1",
"extends": ["@nrwl/workspace"],
"schematics": {
"ng-add": {
"factory": "./src/schematics/ng-add/ng-add",

View File

@ -1,6 +1,7 @@
{
"name": "nx/node",
"version": "0.1",
"extends": ["@nrwl/workspace"],
"schematics": {
"ng-add": {
"factory": "./src/schematics/ng-add/ng-add",

View File

@ -1,6 +1,7 @@
{
"name": "nx/react",
"version": "0.1",
"extends": ["@nrwl/workspace"],
"schematics": {
"ng-add": {
"factory": "./src/schematics/ng-add/ng-add",

View File

@ -27,10 +27,18 @@
"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 ]" }
{
"value": "scss",
"label": "SASS(.scss) [ http://sass-lang.com ]"
},
{
"value": "styl",
"label": "Stylus(.styl)[ http://stylus-lang.com ]"
},
{
"value": "less",
"label": "LESS [ http://lesscss.org ]"
}
]
}
},

View File

@ -1,6 +1,7 @@
{
"name": "nx/web",
"version": "0.1",
"extends": ["@nrwl/workspace"],
"schematics": {
"ng-add": {
"factory": "./src/schematics/ng-add/ng-add",

View File

@ -26,7 +26,8 @@
"ng-new": {
"factory": "./src/schematics/ng-new/ng-new",
"schema": "./src/schematics/ng-new/schema.json",
"description": "Create a workspace"
"description": "Create a workspace",
"hidden": true
},
"library": {

View File

@ -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', () => {
it('should not generate test configuration', async () => {
const resultTree = await runSchematic(

View File

@ -4,7 +4,6 @@ import { Framework } from '../../utils/framework';
export interface Schema {
name: string;
directory?: string;
style?: string;
skipTsConfig: boolean;
skipFormat: boolean;
tags?: string;

View File

@ -18,22 +18,6 @@
"description": "A directory where the app is placed",
"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": {
"type": "string",
"enum": ["jest", "none"],

View File

@ -7,8 +7,7 @@
"properties": {
"npmScope": {
"type": "string",
"description": "Npm scope for importing libs.",
"x-prompt": "What is the npm scope you would like to use for your Nx Workspace?"
"description": "Npm scope for importing libs."
},
"skipInstall": {
"type": "boolean",

View File

@ -23,10 +23,18 @@
"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 ]" }
{
"value": "scss",
"label": "SASS(.scss) [ http://sass-lang.com ]"
},
{
"value": "styl",
"label": "Stylus(.styl)[ http://stylus-lang.com ]"
},
{
"value": "less",
"label": "LESS [ http://lesscss.org ]"
}
]
}
},

View File

@ -25,10 +25,18 @@
"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 ]" }
{
"value": "scss",
"label": "SASS(.scss) [ http://sass-lang.com ]"
},
{
"value": "styl",
"label": "Stylus(.styl)[ http://stylus-lang.com ]"
},
{
"value": "less",
"label": "LESS [ http://lesscss.org ]"
}
]
}
}

View File

@ -23,10 +23,18 @@
"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 ]" }
{
"value": "scss",
"label": "SASS(.scss) [ http://sass-lang.com ]"
},
{
"value": "styl",
"label": "Stylus(.styl)[ http://stylus-lang.com ]"
},
{
"value": "less",
"label": "LESS [ http://lesscss.org ]"
}
]
}
},