How can I move bower libraries in ASP.NET Core?

前端 未结 1 2006
旧时难觅i
旧时难觅i 2021-01-21 16:55

In my wwwroot folder I have two subfolders called lib and lib_bower. My lib_bower folder is setup in my .bowerrc

1条回答
  •  执笔经年
    2021-01-21 17:10

    You can use gulp task runner to move bootstrap folder into lib folder.

    Configuration code(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/'));
    }); 
    

    Then right click gulpfile.js, select Task Runner Explorer, run the copy-bootstrap task or set Bindings to Before Build .

    0 讨论(0)
提交回复
热议问题