grunt-bower-task 不会进行拷贝

可爱的蓝精灵
  • 5
新手上路,请多包涵

1.我已经安装好了bower,并且下载了我需要的js库

bower.json:

{
  "name": "myproject",
  "description": "",
  "main": "",
  "license": "MIT",
  "homepage": "",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "requirejs": "^2.3.6",
    "angular": "angularjs#^1.7.5",
    "jquery": "^3.3.1",
    "bootstrap": "^4.1.3"
  }
}

2.也安装了grunt-bower-task配置了gruntfile.js

gruntfile.js

module.exports = function(grunt) {
  grunt.initConfig({
    bower: {
        install: {
          options: {
            targetDir: './lib',
            layout: 'byComponent',
            install: true,
            verbose: false,
            cleanTargetDir: false,
            cleanBowerDir: false,
            bowerOptions: {}
          }
        }
  }    
  });
 
  grunt.loadNpmTasks('grunt-bower-task');
 
};

3.但是运行grunt bower却没有任何反应,没有copy过程

F:\myproject>grunt bower
Running "bower:install" (bower) task
>> Installed bower packages

Done.
评论
阅读 635
撰写回答

登录后参与交流、获取后续更新提醒

宣传栏