diff --git a/.gitignore b/.gitignore index f2decd3b8..62b9c1c3b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store build +lib/ node_modules/ release/ npm-debug.log diff --git a/Gruntfile.js b/Gruntfile.js index 849da8aa3..3848246dd 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -51,6 +51,19 @@ module.exports = function(grunt) { ] } }, + babel: { + dist: { + files: [ + { + expand: true, + cwd: "src", + src: ["**/*.js", "**/*.jsx"], + dest: "lib", + ext: '.js' + } + ] + } + }, browserify: { options: { browserifyOptions: { @@ -84,7 +97,8 @@ module.exports = function(grunt) { }, clean: { build: ["build/", "release/"], - dev: ["build/"] + dev: ["build/"], + dist: ["lib/"] }, connect: { dev: { @@ -146,6 +160,7 @@ module.exports = function(grunt) { }); grunt.loadNpmTasks("grunt-aws-s3"); + grunt.loadNpmTasks("grunt-babel"); grunt.loadNpmTasks("grunt-browserify"); grunt.loadNpmTasks("grunt-contrib-clean"); grunt.loadNpmTasks("grunt-contrib-connect"); @@ -158,6 +173,7 @@ module.exports = function(grunt) { grunt.registerTask("build", ["clean:build", "env:build", "browserify:build", "uglify:build"]); + grunt.registerTask("dist", ["clean:dist", "babel:dist"]); grunt.registerTask("dev", ["clean:dev", "connect:dev", "browserify:dev", "watch"]); grunt.registerTask("design", ["clean:dev", "connect:dev", "browserify:design", "watch"]); grunt.registerTask("purge_cdn", ["http:purge_js", "http:purge_js_min", "http:purge_major_js", "http:purge_major_js_min", "http:purge_minor_js", "http:purge_minor_js_min"]); diff --git a/package.json b/package.json index 0763d5923..13c7f1b70 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "start": "grunt dev", "build": "grunt build", "design": "grunt design", + "dist": "grunt dist", "test": "zuul -- test/*/*.test.js", "test:browser": "zuul --local 8080 --disable-tunnel -- test/*/*.test.js", "test:phantom": "mochify --recursive --extension=.jsx" @@ -38,6 +39,7 @@ "expect.js": "^0.3.1", "grunt": "^0.4.5", "grunt-aws-s3": "^0.14.0", + "grunt-babel": "^6.0.0", "grunt-browserify": "^4.0.0", "grunt-cli": "^0.1.13", "grunt-contrib-clean": "^0.6.0",