Reputation: 169
Here is my code which finds components and injects them directly into the INDEX.HTML file.
grunt.loadNpmTasks('grunt-wiredep');
wiredep: {
target: {
src: 'index.html' // point to your HTML file.
}
}
and in index.html
< !-- bower:js -->
< !-- endbower -->
after that i install any library via bower like.
bower install jquery --save
and then
grunt wiredep
after that i got
➜ dc-customer-portal-spa git:(master) ✗ grunt wiredep --debug
Running "wiredep:target" (wiredep) task [D] Task source: /var/www/dc-customer-portal-spa/node_modules/grunt-wiredep/tasks/wiredep.js
Done, without errors.
But not included in html file, Kindly guide me.
Upvotes: 0
Views: 142
Reputation: 3192
If the grunt code posted is the actual content of your gruntfile, you're missing the grunt.initConfig() call.
This should work better :
module.exports = function( grunt ){
grunt.loadNpmTasks('grunt-wiredep');
grunt.initConfig({
wiredep: {
target: {
src: 'index.html' // point to your HTML file.
}
}
});
};
Upvotes: 0