Comparing version 2.3.0 to 2.4.0
36
index.js
@@ -10,2 +10,3 @@ 'use strict'; | ||
var deepAssign = require('deep-extend'); | ||
var checkdir = require('checkdir'); | ||
var Q = require('q'); | ||
@@ -15,3 +16,2 @@ var mkdirp = Q.denodeify(require('mkdirp')); | ||
var writeFile = Q.denodeify(fs.writeFile); | ||
var readdir = Q.denodeify(fs.readdir); | ||
var babelPolyfillPath = require.resolve('babel-polyfill/dist/polyfill.js'); | ||
@@ -191,34 +191,2 @@ var normalizeCssPath = require.resolve('normalize.css/normalize.css'); | ||
module.exports.preflight = function preflight(projectDir) { | ||
function isDirEmpty(files) { | ||
var noOfFiles = files.length; | ||
if (files.length > 0) { | ||
return { | ||
empty: false, | ||
exists: true, | ||
files: noOfFiles | ||
} | ||
} else { | ||
return { | ||
empty: true, | ||
exists: true, | ||
files: noOfFiles | ||
} | ||
} | ||
} | ||
function dirDoesNotExist(err) { | ||
if (err.code === 'ENOENT') { | ||
return { | ||
empty: true, | ||
exists: false, | ||
files: 0 | ||
}; | ||
} else { | ||
return err; | ||
} | ||
} | ||
return readdir(projectDir).then(isDirEmpty).catch(dirDoesNotExist); | ||
} | ||
module.exports.preflight = checkdir; |
{ | ||
"name": "barnyard", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Bootstrap/Scaffold a project for use with Piggy in the Middle and Baconize", | ||
@@ -23,2 +23,3 @@ "main": "index.js", | ||
"babel-polyfill": "^6.3.14", | ||
"checkdir": "^1.0.0", | ||
"deep-extend": "^0.4.1", | ||
@@ -25,0 +26,0 @@ "detab": "^1.0.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18889
8
185
+ Addedcheckdir@^1.0.0
+ Addedany-promise@1.3.0(transitive)
+ Addedcheckdir@1.1.0(transitive)
+ Addedmz@2.7.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedthenify@3.3.1(transitive)
+ Addedthenify-all@1.6.0(transitive)