Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[fix] path.existsSync was moved to fs.existsSync

  • Loading branch information...
commit b4c8510c2e8e4d0c1d620c857491cd6e73d18d07 1 parent c8cba41
Joshua Holbrook jesusabdullah authored

Showing 2 changed files with 8 additions and 8 deletions. Show diff stats Hide diff stats

  1. +4 4 lib/glue.js
  2. +4 4 lib/utils.js
8 lib/glue.js
@@ -51,7 +51,7 @@ function glueCSS(css) {
51 51 _file = utils.cleanURL(line.match(regexs.fileRegex)[0]);
52 52 fileUrl = path.join(srcDir, _file);
53 53
54   - if (path.existsSync(fileUrl)) {
  54 + if (fs.existsSync(fileUrl)) {
55 55 files.push(_file);
56 56
57 57 if(options.watch && watched.indexOf(_file) === -1) newFiles = true;
@@ -95,7 +95,7 @@ function watchFile(file) {
95 95 function createFiles() {
96 96 if (firstTime) console.log('');
97 97
98   - if (!path.existsSync(buildDir)) fs.mkdirSync('build');
  98 + if (!fs.existsSync(buildDir)) fs.mkdirSync('build');
99 99
100 100 fs.writeFileSync(buildCSS, code.glued, 'utf8');
101 101 utils.log('success', utils.colorize('blue', 'Glue ') + utils.colorize('green', firstTime ? 'created' : 'updated') + ' build/main.css');
@@ -123,12 +123,12 @@ module.exports = function(_options) {
123 123 buildCSS = path.join(buildDir, 'main.css')
124 124
125 125
126   - if (!path.existsSync(srcDir)) {
  126 + if (!fs.existsSync(srcDir)) {
127 127 utils.log('error', utils.colorize('red', 'Couldn\'t find directory: ' + srcDir));
128 128 process.exit(1);
129 129 }
130 130
131   - if (!path.existsSync(srcCSS)) {
  131 + if (!fs.existsSync(srcCSS)) {
132 132 utils.log('error', utils.colorize('red', 'Couldn\'t find the main.css file.'));
133 133 process.exit(1);
134 134 }
8 lib/utils.js
@@ -27,10 +27,10 @@ module.exports.createStructure = function (_path) {
27 27 src = path.join(_path, 'src');
28 28 build = path.join(_path, 'build');
29 29
30   - if (!path.existsSync(_path)) fs.mkdirSync(_path);
31   - if (!path.existsSync(src)) fs.mkdirSync(src);
32   - if (!path.existsSync(path.join(src, 'modules'))) fs.mkdirSync(path.join(src, 'modules'));
33   - if (!path.existsSync(build)) fs.mkdirSync(build);
  30 + if (!fs.existsSync(_path)) fs.mkdirSync(_path);
  31 + if (!fs.existsSync(src)) fs.mkdirSync(src);
  32 + if (!fs.existsSync(path.join(src, 'modules'))) fs.mkdirSync(path.join(src, 'modules'));
  33 + if (!fs.existsSync(build)) fs.mkdirSync(build);
34 34
35 35 fs.writeFileSync(
36 36 path.join(src, 'main.css'),

0 comments on commit b4c8510

Please sign in to comment.
Something went wrong with that request. Please try again.