Created
February 19, 2014 22:15
-
-
Save slashdotdash/9102812 to your computer and use it in GitHub Desktop.
Grunt config to with task to compile React .jsx files to .js
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
/*global module:false*/ | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
react: { | |
jsx: { | |
files: [ | |
{ | |
expand: true, | |
cwd: 'public/js', | |
src: [ '**/*.jsx' ], | |
dest: 'public/js', | |
ext: '.js' | |
} | |
] | |
} | |
}, | |
watch: { | |
react: { | |
files: 'public/js/**/*.jsx', | |
tasks: ['react'] | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-react'); | |
grunt.registerTask('default', ['react']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment