Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #104 - "mkdir -p" fail on Windows OS was fixed #105

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
#104 - "mkdir -p" fail on Windows OS was fixed
  • Loading branch information
anton-marchenko committed Dec 17, 2018
commit c34a7425b5a0c860599e7625f69ea1bfa7365e51
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