Last active
January 12, 2016 20:21
-
-
Save MiguelCastillo/e124624626214383b870 to your computer and use it in GitHub Desktop.
Sample bundler config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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