chore: use fs-extra instead of mkdirp package (#992)

This commit is contained in:
Róbert Kiss
2019-07-28 12:32:30 +02:00
committed by László Monda
parent 66d6802920
commit 1b569aa82b
2 changed files with 3 additions and 4 deletions

View File

@@ -64,7 +64,6 @@
"jsonfile": "4.0.0", "jsonfile": "4.0.0",
"lerna": "3.16.1", "lerna": "3.16.1",
"lodash": "4.17.15", "lodash": "4.17.15",
"mkdirp": "0.5.1",
"node-hid": "0.7.8", "node-hid": "0.7.8",
"npm-run-all": "4.0.2", "npm-run-all": "4.0.2",
"nrf-intel-hex": "1.3.0", "nrf-intel-hex": "1.3.0",

View File

@@ -1,7 +1,7 @@
const SVGSpriter = require('svg-sprite'); const SVGSpriter = require('svg-sprite');
const path = require('path'); const path = require('path');
const mkdirp = require('mkdirp'); const fs = require('fs-extra');
const fs = require('fs');
let config = { let config = {
'dest': 'packages/uhk-web/src/assets/', 'dest': 'packages/uhk-web/src/assets/',
log: 'verbose', log: 'verbose',
@@ -90,7 +90,7 @@ function writeResultFiles (error, result) {
// Run through all created resources and write them to disk // Run through all created resources and write them to disk
for (const type in result[mode]) { for (const type in result[mode]) {
mkdirp.sync(path.dirname(result[mode][type].path)); fs.ensureDirSync(path.dirname(result[mode][type].path));
fs.writeFileSync(result[mode][type].path, result[mode][type].contents); fs.writeFileSync(result[mode][type].path, result[mode][type].contents);
} }
} }