Skip to content

Commit

Permalink
fix(linter): add .dockerignore file & fixed failed build due to linter
Browse files Browse the repository at this point in the history
  • Loading branch information
shahabganji authored and 3cp committed Sep 12, 2019
1 parent 9ea4c54 commit 966f55f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 14 deletions.
12 changes: 6 additions & 6 deletions lib/workflow/questionnaire.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
16 changes: 8 additions & 8 deletions lib/workflow/select-features.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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) {
Expand Down
19 changes: 19 additions & 0 deletions skeleton/common/.dockerignore__if_docker
Original file line number Diff line number Diff line change
@@ -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.