Created
October 6, 2015 12:29
-
-
Save adnasa/b1ede25e4d3ea658a6df to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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