Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from node-migrator-bot/clean

Hi! I fixed some code for you!
  • Loading branch information...
commit 281876edcd801e15c439ae0497c51c5dbde89478 2 parents c8cba41 + b4c8510
@elving authored
Showing with 8 additions and 8 deletions.
  1. +4 −4 lib/glue.js
  2. +4 −4 lib/utils.js
View
8 lib/glue.js
@@ -51,7 +51,7 @@ function glueCSS(css) {
_file = utils.cleanURL(line.match(regexs.fileRegex)[0]);
fileUrl = path.join(srcDir, _file);
- if (path.existsSync(fileUrl)) {
+ if (fs.existsSync(fileUrl)) {
files.push(_file);
if(options.watch && watched.indexOf(_file) === -1) newFiles = true;
@@ -95,7 +95,7 @@ function watchFile(file) {
function createFiles() {
if (firstTime) console.log('');
- if (!path.existsSync(buildDir)) fs.mkdirSync('build');
+ if (!fs.existsSync(buildDir)) fs.mkdirSync('build');
fs.writeFileSync(buildCSS, code.glued, 'utf8');
utils.log('success', utils.colorize('blue', 'Glue ') + utils.colorize('green', firstTime ? 'created' : 'updated') + ' build/main.css');
@@ -123,12 +123,12 @@ module.exports = function(_options) {
buildCSS = path.join(buildDir, 'main.css')
- if (!path.existsSync(srcDir)) {
+ if (!fs.existsSync(srcDir)) {
utils.log('error', utils.colorize('red', 'Couldn\'t find directory: ' + srcDir));
process.exit(1);
}
- if (!path.existsSync(srcCSS)) {
+ if (!fs.existsSync(srcCSS)) {
utils.log('error', utils.colorize('red', 'Couldn\'t find the main.css file.'));
process.exit(1);
}
View
8 lib/utils.js
@@ -27,10 +27,10 @@ module.exports.createStructure = function (_path) {
src = path.join(_path, 'src');
build = path.join(_path, 'build');
- if (!path.existsSync(_path)) fs.mkdirSync(_path);
- if (!path.existsSync(src)) fs.mkdirSync(src);
- if (!path.existsSync(path.join(src, 'modules'))) fs.mkdirSync(path.join(src, 'modules'));
- if (!path.existsSync(build)) fs.mkdirSync(build);
+ if (!fs.existsSync(_path)) fs.mkdirSync(_path);
+ if (!fs.existsSync(src)) fs.mkdirSync(src);
+ if (!fs.existsSync(path.join(src, 'modules'))) fs.mkdirSync(path.join(src, 'modules'));
+ if (!fs.existsSync(build)) fs.mkdirSync(build);
fs.writeFileSync(
path.join(src, 'main.css'),
Please sign in to comment.
Something went wrong with that request. Please try again.