stephenplusplus/grunt-wiredep

How does "overrides" work?

Closed this issue · 1 comments

ekkis commented

I installed the module via npm and configured it as shown below. I'm using a Bower package (waypoints#4.0.1) whose bower.json declares "main" as the noframework.waypoints.js but I actually want to use the jquery version. I've formulated the override as shown below but it doesn't work... how is it supposed to be expressed? there are no examples in the docs

thanks!

p.s. incidentally, the docs on NPM differ from those here (this project is grunt-wiredep but the link from NPM for grunt-bower-install leads here). is grunt-wiredep the evolution of grunt-bower-install and thus I should ditch the latter and reconfigure?

grunt.initConfig({
        bowerInstall: {
            target: {
                src: ['views/layouts/*.handlebars'],
                cwd: '', 
                dependencies: true,
                devDependencies: false,
                exclude: [
                    'bower_components/respond/dest/respond.src.js'
                ],  
                overrides: {
                    'bower_components/waypoints/lib/noframework.waypoints.js': 'bower_components/waypoints/lib/jquery.waypoints.js'
                }   
            }   
        },  

ekkis commented

found the answer here: https://github.com/taptapship/wiredep#configuration under "Bower Overrides". this works (yea!):

overrides: {
    waypoints: {
        main: "lib/jquery.waypoints.js'
    }
}

thanks for the tool. it's awesome (still exploring how to use it for styles)