Skip to content
Permalink
Browse files

fix(linter): add .dockerignore file & fixed failed build due to linter

  • Loading branch information
shahabganji authored and 3cp committed Sep 3, 2019
1 parent 9ea4c54 commit 966f55f1fe31605ddf6da248e7fb64fd99f80c11
Showing with 33 additions and 14 deletions.
  1. +6 −6 lib/workflow/questionnaire.js
  2. +8 −8 lib/workflow/select-features.js
  3. +19 −0 skeleton/common/.dockerignore__if_docker
@@ -6,18 +6,18 @@ exports.pickPlugin = {
// add "plugin" to feature set for pluginFlow.
// because this only provides one choice (default choice), it
// is never prompted to end user.
choices: [{value: 'plugin'}]
choices: [{ value: 'plugin' }]
};

exports.askDocker = {
message: 'Do you like to add a Dockerfile?' ,
choices:[{
value: 'docker' , message: 'Sure, yes'
message: 'Do you like to add a Dockerfile?',
choices: [{
value: 'docker', message: 'Sure, yes'
},
{
value: 'none' , message: 'No'
value: 'none', message: 'No'
}
]
]
};

exports.askBundler = {
@@ -28,13 +28,13 @@ const {
// default answer (note: default answer is not always same as recommended feature).
//
// _debug is used to pass in answers for prompts.
module.exports = async function(preselectedFeatures = [], opts = {}, _debug = []) {
module.exports = async function (preselectedFeatures = [], opts = {}, _debug = []) {
const workflow = await selectWorkFlow({
// If user preselected some features, don't ask them to choose work flow.
unattended: opts.unattended || !!preselectedFeatures.length,
plugin: opts.plugin
}, _debug);
const {flow, recommendedFeatures, unattended} = workflow;
const { flow, recommendedFeatures, unattended } = workflow;
const flowUnattended = opts.unattended || unattended;

// Allow user to overwrite recommended features.
@@ -57,12 +57,12 @@ module.exports = async function(preselectedFeatures = [], opts = {}, _debug = []
// For example, unit testing default answer is none (no unit testing), but
// we recommend user to have jest in all our default work flow choices.
const PRESETS = {
'default-esnext': {flow: 'app', recommendedFeatures: ['jest', 'vscode'], unattended: true},
'default-typescript': {flow: 'app', recommendedFeatures: ['jest', 'typescript', 'vscode'], unattended: true},
'custom-app': {flow: 'app'},
'default-plugin-esnext': {flow: 'plugin', recommendedFeatures: ['jest', 'vscode'], unattended: true},
'default-plugin-typescript': {flow: 'plugin', recommendedFeatures: ['jest', 'typescript', 'vscode'], unattended: true},
'custom-plugin': {flow: 'plugin'}
'default-esnext': { flow: 'app', recommendedFeatures: ['jest', 'vscode'], unattended: true },
'default-typescript': { flow: 'app', recommendedFeatures: ['jest', 'typescript', 'vscode'], unattended: true },
'custom-app': { flow: 'app' },
'default-plugin-esnext': { flow: 'plugin', recommendedFeatures: ['jest', 'vscode'], unattended: true },
'default-plugin-typescript': { flow: 'plugin', recommendedFeatures: ['jest', 'typescript', 'vscode'], unattended: true },
'custom-plugin': { flow: 'plugin' }
};

async function selectWorkFlow(opts, _debug) {
@@ -0,0 +1,19 @@
Dockerfile
.dockerignore

node_modules

.git
.gitignore
.eslintrc.json
.editorconfig

.DS_STORE
Thumbs.db

.idea
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

0 comments on commit 966f55f

Please sign in to comment.
You can’t perform that action at this time.