Skip to content

Instantly share code, notes, and snippets.

@MiguelCastillo
Last active January 12, 2016 20:21
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 MiguelCastillo/e124624626214383b870 to your computer and use it in GitHub Desktop.
Save MiguelCastillo/e124624626214383b870 to your computer and use it in GitHub Desktop.
Sample bundler config
//
// http://24ways.org/2013/grunt-is-not-weird-and-hard/
//
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
var sassybits = require("sassy-bits");
var babelbits = require("babel-bits");
var jsBundler = require("bit-bundler-browserpack");
var vendorBundle = require("bit-bundler-vendor");
var builtinsPlugin = require("bit-bundler-builtins");
var jsPlugin = require("bit-loader-js");
var cssPlugin = require("bit-loader-css");
grunt.initConfig({
pkg: pkg,
bitbundler: {
build: {
files: [{
src: "example/main.js",
dest: "example/dist/app.js"
}],
loader: {
ignore: ["three"],
plugins: [
jsPlugin({
transform: babelbits
}),
cssPlugin({
transform: sassybits.configure({ load: false })
})
]
},
bundler: jsBundler({
printInfo: true,
plugins: [
vendorBundle("example/dist/vendor.js")
]
})
}
}
});
grunt.registerTask("build", ["bitbundler:build"]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment