Skip to content

Instantly share code, notes, and snippets.

@shubik
Created April 17, 2014 05:04
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 shubik/10954124 to your computer and use it in GitHub Desktop.
Save shubik/10954124 to your computer and use it in GitHub Desktop.
JSX Grunt task
grunt.initConfig({
srcPath: 'src',
buildPath: 'public',
shell: {
'build-jsx': {
command: [
'jsx -x jsx <%= srcPath %>/jsx/ <%= srcPath %>/js/app/views/',
'rm -rf <%= src_path %>/js/app/views/.module-cache/'
].join(' && '),
stdout: true,
failOnError: true
}
}
});
grunt.loadNpmTasks('grunt-shell');
grunt.registerTask('jsx', [
'shell:build-jsx'
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment