我正在使用main-bower-files通过 gulp 将文件获取到某个文件夹。但是某些 css 文件丢失了,即使它们位于 bower_components 文件夹中。
例如,来自“pdf.js-viewer”的 CSS 文件 viewer.css 不会被复制,即使来自同一文件夹的 .js 文件也是如此。
知道有什么问题吗?任何提示表示赞赏!
// gulpfile.js: (skipped some unimportant libs etc.
var gutil = require('gulp-util');
var bowerFiles = require('main-bower-files');
var paths = {
localDev: '/.app'
}
var pipes = {};
pipes.moveBowerStyles = function() {
gutil.log(bowerFiles()); // this already doesn't have appropriate viewer.css file from the mentioned lib for example (also some other are missing)
return gulp.src(bowerFiles())
.pipe(gulp.dest(paths.localDev + '/assets/styles/lib'));
};
gulp.task('default', ['moveBowerStyles']);
// bower.json:
{
"name": "test",
"description": "",
"main": "",
"license": "MIT",
"homepage": "",
"private": true,
"dependencies": {
"jquery": "^3.1.0",
"angular-datatables": "^0.5",
"angular": "^1.6.4",
"angular-ui-router": "^1.0.0",
"bootstrap": "^3.3",
"font-awesome": "^4.6",
"font-awesome-animation": "^0.0.9",
"datatables": "^1.10",
"angular-route": "^1.5",
"angular-translate": "^2.12",
"angular-cookies": "^1.6.4",
"angular-translate-loader-url": "^2.12",
"angular-translate-loader-static-files": "^2.12",
"angular-translate-loader-partial": "^2.12",
"angular-translate-storage-cookie": "^2.12",
"angular-bootstrap": "^2.5.0",
"bower-bootswatch-paper": "paper-less#*",
"oclazyload": "1.1.0",
"bower": "*",
"install": "^1.0",
"ngsecurity": "^1.6",
"angular-permission": "^4.0",
"angular-oauth2": "^4.1.0",
"angular-schema-form": "^0.8",
"ng-dialog": "^0.6",
"bootstrap-select": "^1.11",
"angular-select2": "^1.5.2",
"angular-ui-select": "^0.19.8",
"angular-media-queries": "^0.6",
"jquery-ui": "^1.12.1",
"angular-touch": "1.5.0",
"AngularHammer": "ryanmullins-angular-hammer#^2.2.0",
"angular-breadcrumb": "^0.5.0",
"pdf.js-viewer": "^0.3.3",
"angular-ui-sortable": "^0.16.1",
"angular-animate": "1.6.4",
"angular-file-upload": "^2.5.0",
"angular-ui-mask": "^1.8.7",
"angular-inview": "^2.2.0",
"angular-ui-notification": "^0.3.6",
"angular-bootstrap-switch": "^0.5.1",
"bootstrap-switch": "^3.3.4",
"angular-pdfjs-viewer": "^0.7.4",
"ui-bootstrap": "angular-ui-bootstrap#^2.5.0",
"angular-i18n": "^1.6.3",
"angular-hotkeys": "chieffancypants/angular-hotkeys#^1.7.0",
"angular-resource": "1.6.4",
"select2": "^4.0.3",
"angular-drag-and-drop-lists": "^2.1.0"
},
"devDependencies": {
"angular-translate": "^2.15.1"
},
"resolutions": {
"angular-cookies": "^1.6.4",
"angular": "^1.6.4",
"jquery": "^3.1.0",
"bootstrap-switch": "3.3.2",
"angular-bootstrap": "^0.10",
"angular-translate": "^2.15.1",
"select2": "~3.5.2"
}
}