Tra*_*man 2 bower .net-core asp.net-core
在我的wwwroot文件夹中,我有两个名为lib和的子文件夹lib_bower.我的lib_bower文件夹在我的.bowerrc文件中设置如下:
{
"directory": "wwwroot/lib_bower"
}
Run Code Online (Sandbox Code Playgroud)
当我恢复时,bower packages我离开了这个:
如果找不到文件,我想在构建时将整个dist文件夹移动bootstrap到我的lib文件夹中.我怎样才能做到这一点?
您可以使用gulp任务运行器将bootstrap文件夹移动到lib文件夹中.
配置代码(gulpfile.js):
var gulp = require('gulp');
gulp.task('default', function () {
// place code for your default task here
});
var paths = {};
paths.webroot = "wwwroot/";
paths.bowerSrc = "./wwwroot/lib_bower/";
paths.lib = paths.webroot + "lib/";
gulp.task("copy-bootstrap", function () {
return gulp.src(paths.bowerSrc + '/bootstrap/dist/**/*.*', { base: paths.bowerSrc + '/bootstrap/dist/' })
.pipe(gulp.dest(paths.lib + '/bootstrap/'));
});
Run Code Online (Sandbox Code Playgroud)
然后右键单击gulpfile.js,选择Task Runner Explorer,运行copy-bootstrap任务或设置Bindings为Before Build.
| 归档时间: |
|
| 查看次数: |
686 次 |
| 最近记录: |