Skip to content

Instantly share code, notes, and snippets.

@adnasa
Created October 6, 2015 12:29
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 adnasa/b1ede25e4d3ea658a6df to your computer and use it in GitHub Desktop.
Save adnasa/b1ede25e4d3ea658a6df to your computer and use it in GitHub Desktop.
module.exports = function (grunt) {
grunt.initConfig({
browserify: {
dist: {
options: {
transform: [
["babelify", {
loose: "all",
stage: 0
}],
"reactify"
]
},
files: {
// if the source file has an extension of es6 then
// we change the name of the source file accordingly.
// The result file's extension is always .js
"./dist/module.js": ["./modules/index.js"]
}
}
},
watch: {
scripts: {
files: ["./modules/**/*.js"],
tasks: ["browserify"]
}
}
});
grunt.loadNpmTasks("grunt-browserify");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.registerTask("default", ["watch"]);
grunt.registerTask("build", ["browserify"]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment