Skip to content

Commit

Permalink
#104 - "mkdir -p" fail on Windows OS was fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-marchenko committed Dec 17, 2018
1 parent 44a956d commit c34a742
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
18 changes: 12 additions & 6 deletions makesvg.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const fs = require('fs');
const mkdirp = require('mkdirp');
const svgstore = require('svgstore');
const svgDir = './src/svg';

Expand All @@ -17,9 +18,14 @@ function getFileList(dir) {
});
}

fs.readdir('./src/svg', (err, dirs) => {
dirs.forEach(dir => {
getFileList(dir);
});
})

mkdirp('./dist/svg', (mkdirpErr) => {
if (mkdirpErr) {
console.error(mkdirpErr);
} else {
fs.readdir('./src/svg', (err, dirs) => {
dirs.forEach(dir => {
getFileList(dir);
});
});
}
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"karma-sourcemap-loader": "^0.3.7",
"karma-webdriver-launcher": "git+https://github.com/nhnent/karma-webdriver-launcher.git#v1.1.0",
"karma-webpack": "^1.8.0",
"mkdirp": "^0.5.1",
"safe-umd-webpack-plugin": "0.0.2",
"simulant": "^0.2.2",
"stylus": "^0.54.5",
Expand All @@ -59,7 +60,7 @@
"test": "karma start --no-single-run",
"test:ne": "KARMA_SERVER=ne karma start",
"bundle": "webpack && webpack -p && npm run bundle:svg",
"bundle:svg": "mkdir -p dist/svg && node makesvg.js",
"bundle:svg": "node makesvg.js",
"serve": "webpack-dev-server --inline --hot -d",
"cpy-dist2doc": "mkdir -p doc/dist && cp -f -r dist doc",
"doc": "jsdoc -c jsdoc.conf.json && npm run cpy-dist2doc",
Expand Down

0 comments on commit c34a742

Please sign in to comment.