4 Commits
2 changed files with 7 additions and 6 deletions
+5 -4
View File
@@ -21,6 +21,7 @@
"babel-plugin-transform-export-extensions": "^6.8.0",
"babel-register": "^6.18.0",
"chai": "^3.5.0",
"cross-env": "^3.1.3",
"eslint": "^3.9.1",
"eslint-config-canonical": "^4.0.0",
"husky": "^0.11.9",
@@ -43,11 +44,11 @@
"url": "https://github.com/gajus/create-index"
},
"scripts": {
"build": "NODE_ENV=production babel --source-maps --copy-files ./src --out-dir ./dist",
"build": "cross-env NODE_ENV=production babel --source-maps --copy-files ./src --out-dir ./dist",
"create-index": "node ./dist/bin/create-index ./src/utilities",
"lint": "NODE_ENV=development eslint ./src ./tests",
"lint": "cross-env NODE_ENV=development eslint ./src ./tests",
"precommit": "npm run test",
"test": "npm run build && npm run lint && NODE_ENV=development mocha --compilers js:babel-register"
"test": "npm run build && npm run lint && cross-env NODE_ENV=development mocha --compilers js:babel-register"
},
"version": "1.0.0"
"version": "1.1.0"
}
+2 -2
View File
@@ -18,7 +18,7 @@ export default (directoryPaths, options = {}) => {
if (options.updateIndex) {
log('Update index:', options.updateIndex ? chalk.green('true') : chalk.red('false'));
} else {
log('Recursive:', options.ignoreUnsafe ? chalk.green('true') : chalk.red('false'));
log('Recursive:', options.recursive ? chalk.green('true') : chalk.red('false'));
log('Ignore unsafe:', options.ignoreUnsafe ? chalk.green('true') : chalk.red('false'));
}
@@ -64,7 +64,7 @@ export default (directoryPaths, options = {}) => {
fs.writeFileSync(indexFilePath, indexCode);
if (existingIndexCode && existingIndexCode === indexCode) {
log(indexFilePath, chalk.yellow('[index have not changed]'));
log(indexFilePath, chalk.yellow('[index has not changed]'));
} else if (existingIndexCode && existingIndexCode !== indexCode) {
log(indexFilePath, chalk.green('[updated index]'));
} else {