Skip to content

Commit

Permalink
fix(copy-plugin): replace ncp with fs-extra to fix the silent error i…
Browse files Browse the repository at this point in the history
…n macos
  • Loading branch information
Genuifx committed May 29, 2020
1 parent ccfbbe8 commit 843a00e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/wxa-plugin-copy/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var ncp = require('ncp').ncp;
var fs = require('fs-extra');
var path = require('path');
var mkdirp = require('mkdirp');

Expand Down Expand Up @@ -33,7 +33,7 @@ module.exports = class CopyPlugin {
mkdirp(dist, function(err) {
if(err) return next(err);

ncp(source, dist, {
fs.copy(source, dist, {
filter(filename){
return !options.ignore.some((value)=>{
let reg = value instanceof RegExp ? value : new RegExp(value);
Expand Down
38 changes: 34 additions & 4 deletions packages/wxa-plugin-copy/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/wxa-plugin-copy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"author": "Genuifx",
"license": "MIT",
"dependencies": {
"mkdirp": "^0.5.1",
"ncp": "^2.0.0"
"fs-extra": "^9.0.0",
"mkdirp": "^0.5.1"
},
"gitHead": "b925c4fe80f493edd89c0c39a70e6eda3b97d915"
}

0 comments on commit 843a00e

Please sign in to comment.