Skip to content

Commit

Permalink
Merge pull request #248 from ember-cli/remove-mkdirp
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Sep 4, 2020
2 parents 542e737 + 65b3e67 commit 8312cfc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use strict';

const fs = require('fs');
const walkSync = require('walk-sync');
const Plugin = require('broccoli-plugin');
const path = require('path');
const defaults = require('lodash.defaultsdeep');
const symlinkOrCopy = require('symlink-or-copy');
const mkdirp = require('mkdirp');
const MatcherCollection = require('matcher-collection');
const debug = require('debug')('broccoli-uglify-sourcemap');
const queue = require('async-promise-queue');
Expand Down Expand Up @@ -71,7 +71,7 @@ module.exports = class UglifyWriter extends Plugin {
let inFile = path.join(inputPath, relativePath);
let outFile = path.join(this.outputPath, relativePath);

mkdirp.sync(path.dirname(outFile));
fs.mkdirSync(path.dirname(outFile), { recursive: true });

if (this._isJSExt(relativePath) && !this.excludes.match(relativePath)) {
// wrap this in a function so it doesn't actually run yet, and can be throttled
Expand Down
3 changes: 1 addition & 2 deletions lib/process-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const debug = require('debug')('broccoli-uglify-sourcemap');
const defaults = require('lodash.defaultsdeep');
const fs = require('fs');
const mkdirp = require('mkdirp');
const path = require('path');
const terser = require('terser');
const getSourceMapContent = require('./get-sourcemap-content');
Expand Down Expand Up @@ -81,7 +80,7 @@ module.exports = async function processFile(inFile, outFile, relativePath, outDi
}
return path;
});
mkdirp.sync(mapDir);
fs.mkdirSync(mapDir, { recursive: true });
fs.writeFileSync(path.join(mapDir, mapName), JSON.stringify(newSourceMap));
}
fs.writeFileSync(outFile, result.code);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"release-it-lerna-changelog": "^2.3.0"
},
"engines": {
"node": "10.* || 12.* || >= 14"
"node": "^10.12.0 || 12.* || >= 14"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down

0 comments on commit 8312cfc

Please sign in to comment.