From 245ce7ee98dab77b1e1fc531c3fbd3fb02b2773d Mon Sep 17 00:00:00 2001 From: Chunpeng Huo Date: Mon, 25 Mar 2019 08:51:26 +1100 Subject: [PATCH] feat(generate-skeletons): add plugin skeletons to "au generate-skeletons" --- lib/commands/generate-skeletons/command.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/commands/generate-skeletons/command.js b/lib/commands/generate-skeletons/command.js index b216b03c7..c4fbe03f8 100644 --- a/lib/commands/generate-skeletons/command.js +++ b/lib/commands/generate-skeletons/command.js @@ -5,6 +5,7 @@ const CLIOptions = require('../../cli-options').CLIOptions; const logger = require('aurelia-logging').getLogger('generate-skeletons'); const selectFeatures = require('../../workflow/select-features'); const writeProject = require('../../workflow/write-project'); +const applicable = require('../../workflow/applicable'); // Designed to cover all unit/e2e/transpiler combinations. // Cover decent css/postcss/htmlmin combinations. @@ -79,7 +80,17 @@ const projectDefs = [ 'webpack typescript jest dotnet-core cypress', 'webpack http2 htmlmin-max typescript jest cypress scaffold-navigation', 'webpack http2 sass typescript postcss-typical karma dotnet-core cypress scaffold-navigation vscode', - 'webpack htmlmin-min typescript karma cypress' + 'webpack htmlmin-min typescript karma cypress', + + 'plugin stylus htmlmin-min jest', + 'plugin karma postcss-typical vscode', + 'plugin htmlmin-max typescript jest', + 'plugin typescript karma plugin-scaffold-basic', + + 'plugin htmlmin-max jest', + 'plugin less htmlmin-min postcss-typical postcss-basic karma plugin-scaffold-basic', + 'plugin typescript jest', + 'plugin sass htmlmin-max typescript karma' ]; module.exports = class { @@ -100,7 +111,7 @@ module.exports = class { for (let i = 0, ii = defs.length; i < ii; i++) { let features = _(defs[i].split(' ')).map(_.trim).compact().value(); // Cleanup feature set, and fillup default. - features = await selectFeatures(features, {unattended: true}); + features = await selectFeatures(features, {unattended: true, plugin: applicable(features, 'plugin')}); const projectName = features.join('_'); logger.info(`Writing ${i + 1}/${ii} ${projectName}`);