Bootstrap 3.0.1 bower.json breaks grunt-bower-task task

Twitter Bootstrap 3.0.1 modifies the "main" attribute of its bower.json in this way:

"main": ["./dist/js/bootstrap.js", "./dist/css/bootstrap.css", "./dist/fonts/*"],

They added the element "./dist/fonts/*" in 3.0.1 - it was not in 3.0.0.

Now when I run bower: install from my Gruntfile, I get this error:

Running "bower:install" (bower) task
bower cached https://github.com/twbs/bootstrap.git#3.0.1
bower validate 3.0.1 against https://github.com/twbs/bootstrap.git#>= 3.0.0
bower cached https://github.com/components/jquery.git#2.0.3
bower validate 2.0.3 against https://github.com/components/jquery.git#>= 2.0.0
bower cached https://github.com/components/jquery.git#2.0.3
bower validate 2.0.3 against https://github.com/components/jquery.git#>= 1.9.0
bower install jquery#2.0.3
bower install bootstrap#3.0.1
>> Installed bower packages
grunt-bower copying bower_components/bootstrap/dist/js/bootstrap.js -> public/bootstrap/bootstrap.js
grunt-bower copying bower_components/bootstrap/dist/css/bootstrap.css -> public/bootstrap/bootstrap.css
/Users/hoytk/git/titanium_ui/node_modules/grunt-bower-task/node_modules/bower/node_modules/tmp/lib/tmp.js:261
throw err;
    ^
Error: ENOENT, no such file or directory 'bower_components/bootstrap/dist/fonts/*'

It seems that grunt-bower-task cannot handle it. / dist / fonts / *, but I assume that something simple is missing me. Here is my Gruntfile.js:

module.exports = function(grunt) {
    // Project configuration
    grunt.initConfig({
            pkg: grunt.file.readJSON('package.json'),
            bower: {
                    install: {
                            options: {
                                    targetDir: './public',
                                    verbose: true
                            }
                    }
            }
    });

    // Load bower task plugin
    grunt.loadNpmTasks('grunt-bower-task');

    // The default task - install the bower dependencies
    grunt.registerTask('default', ['bower:install']);
}
+4
source share
1 answer

Bower does not support *the definition of its main file (how this task knows which files to copy, etc.).

, Bootstrap, 3.0.2 glob. Bower (, , ?), globs.

. Bootstrap bower.json ( ) ( , bower.json, , ) : - (

( , .bower.json Bootstrap, ( ))

+2

All Articles