Skip to content

Commit

Permalink
fix(cli): should not generate $vendor dir
Browse files Browse the repository at this point in the history
  • Loading branch information
deepfunc committed Oct 10, 2019
1 parent 6db4079 commit cc02a6e
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 21 deletions.
19 changes: 11 additions & 8 deletions packages/cli/core/plugins/build/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const path = require('path');

exports = module.exports = function () {

this.register('build-assets', function buildAssets () {
this.register('build-assets', function buildAssets() {

this.logger.info('assets', 'building assets');

Expand Down Expand Up @@ -31,13 +31,16 @@ exports = module.exports = function () {
filepath = path.join(fileobj.dir, d.outputFileName);
}

let targetFile = t.npm ? this.getModuleTarget(filepath) : this.getTarget(filepath);
result.push({
src: file,
targetFile: targetFile,
outputCode: d.source.source(),
encoding: d.encoding
});
// do not copy npm files to $vendor.
if (!t.npm) {
let targetFile = this.getTarget(filepath);
result.push({
src: file,
targetFile: targetFile,
outputCode: d.source.source(),
encoding: d.encoding
});
}
}
});
return result;
Expand Down
56 changes: 44 additions & 12 deletions packages/cli/package-lock.json

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

3 changes: 2 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"download": "^6.2.5",
"download-git-repo": "^1.0.2",
"enhanced-resolve": "^4.1.0",
"fs-extra": "^8.1.0",
"handlebars": "^4.1.2",
"hash-sum": "^1.0.2",
"htmlhint": "^0.11.0",
Expand Down Expand Up @@ -72,7 +73,7 @@
"webpack-sources": "^1.1.0"
},
"engines": {
"node": ">=5.0.0"
"node": ">=6"
},
"publishConfig": {
"access": "public"
Expand Down

0 comments on commit cc02a6e

Please sign in to comment.