Skip to content

Instantly share code, notes, and snippets.

@i5on9i
Last active June 10, 2016 04:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save i5on9i/c2ddc1771f5174405c9200fa7f5491ea to your computer and use it in GitHub Desktop.
Save i5on9i/c2ddc1771f5174405c9200fa7f5491ea to your computer and use it in GitHub Desktop.
//------------------------------------------------
//
// Gruntfile.js
//
//------------------------------------------------
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Setup tasks
bower_concat: require('./tasks/bower-concat')(paths),
})
//------------------------------------------------
//
// bower-concat.js
//
//------------------------------------------------
// @ref : https://github.com/sapegin/grunt-bower-concat
module.exports = function (paths) {
//'use strict';
// if the specification is written in bower.json, you don't have to write it here again.
return {
all: {
dest: 'build/lib/_bower.js',
// cssDest: 'build/_bower.css',
exclude: [
'jquery',
'fontawesome',
'react',
],
dependencies: { // order
'underscore': ['jquery'], // underscore needs jquery,
'jquery-toast-plugin': ['jquery'], // toast-plugin needs jquery,
},
bowerOptions: {
relative: false
},
mainFiles: { // without this, bower-concat use the files in "bower.json main"
'jquery-prettyPhoto': 'js/jquery.prettyPhoto.js',
'owlcarousel': [
'owl-carousel/owl.transitions.css',
'owl-carousel/owl.carousel.css',
'owl-carousel/owl.carousel.js',
],
'datatables': [
"media/js/jquery.dataTables.js",
"media/js/dataTables.bootstrap.js"
]
}
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment