wwwgjs:integrating_bower_into_our_workflow

→ grunt wiredep

→ inject Bower packages into your source code with Grunt

npm install --save-dev grunt-wiredep
// grunfile.js

(...)
  //nouvelle tâche
  wiredep: {
    task: {
      src: 'builds/development/**/*.html',
    },
  },

(...)
grunt.loadNpmTasks('grunt-wiredep');
(...)
grunt.registerTask('default', ['wiredep', 'concat', 'sass', 'connect', 'watch']);
// index.html par ex

// css
<!-- bower:css  -->
<!-- endbower -->

// js
<!-- bower:js -->
<!-- endbower -->
wwwgjs/integrating_bower_into_our_workflow.txt · Last modified: 2016/03/29 12:07 by leo