From 832907f2fd48ba0dd146d48ee449107613556382 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 29 Mar 2016 23:01:42 +0200 Subject: [PATCH] Added minor es2015 tweaks --- generators/app/prompts.js | 2 +- utils/all.js | 8 ++++---- utils/config.js | 11 ++++------- utils/yeoman.js | 20 ++++++++++---------- 4 files changed, 19 insertions(+), 22 deletions(-) diff --git a/generators/app/prompts.js b/generators/app/prompts.js index cfa9359..53d91cc 100644 --- a/generators/app/prompts.js +++ b/generators/app/prompts.js @@ -1,5 +1,5 @@ 'use strict'; -let utils = require('../../utils/all'); +const utils = require('../../utils/all'); module.exports = [ { diff --git a/utils/all.js b/utils/all.js index e525cd9..9039bf7 100644 --- a/utils/all.js +++ b/utils/all.js @@ -1,9 +1,9 @@ 'use strict'; -let config = require('./config'); -let yeoman = require('./yeoman'); +const config = require('./config'); +const yeoman = require('./yeoman'); module.exports = { - config: config, - yeoman: yeoman + config, + yeoman }; diff --git a/utils/config.js b/utils/config.js index 8ed9576..2f487e8 100644 --- a/utils/config.js +++ b/utils/config.js @@ -57,12 +57,9 @@ let getDefaultChoice = (setting) => { return config && config.default !== undefined && config.default.length > 0 ? config.default : null; } -// getChoices -// getDefault - module.exports = { - getSetting: getSetting, - getChoices: getChoices, - getChoiceByKey: getChoiceByKey, - getDefaultChoice: getDefaultChoice + getSetting, + getChoices, + getChoiceByKey, + getDefaultChoice }; diff --git a/utils/yeoman.js b/utils/yeoman.js index 2cee20c..3d7c86c 100644 --- a/utils/yeoman.js +++ b/utils/yeoman.js @@ -1,8 +1,8 @@ 'use strict'; -let path = require('path'); -let configUtils = require('./config'); -let _ = require('underscore.string'); +const path = require('path'); +const configUtils = require('./config'); +const _ = require('underscore.string'); // Needed directory paths const baseName = path.basename(process.cwd()); @@ -157,11 +157,11 @@ let getDestinationClassName = (name, type, suffix) => { }; module.exports = { - getBaseDir: getBaseDir, - getAllSettingsFromComponentName: getAllSettingsFromComponentName, - getAppName: getAppName, - getCleanedPathName: getCleanedPathName, - getComponentStyleName: getComponentStyleName, - getDestinationPath: getDestinationPath, - getDestinationClassName: getDestinationClassName + getBaseDir, + getAllSettingsFromComponentName, + getAppName, + getCleanedPathName, + getComponentStyleName, + getDestinationPath, + getDestinationClassName };