diff --git a/Gruntfile.js b/Gruntfile.js index 82cbc24a..54b550d8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -10,6 +10,7 @@ module.exports = function (grunt) { PROJECT_NAME: "<%= pkg.name %>", ENGINE_VERSION: "<%= pkg.version %>", build_dir: "build/<%= ENGINE_VERSION %>", + plugin_dir: "src/plugins/", license: grunt.file.read("LICENSE.txt"), concat: { @@ -49,11 +50,17 @@ module.exports = function (grunt) { unminified: { src: 'api/latest/<%= PROJECT_NAME %>.js', dest: '<%= build_dir %>/<%= PROJECT_NAME %>-<%= ENGINE_VERSION %>.js' + }, + plugins: { + expand: true, + cwd: '<%= plugin_dir %>', + src: '**', + dest: 'api/latest/plugins/' } }, watch: { scripts: { - files: ["<%= concat.engine.src %>", "Gruntfile.js"], + files: ["<%= concat.engine.src %>", "<%= plugin_dir %>/**", "Gruntfile.js"], tasks: ["snapshot"], options: { spawn: false, @@ -70,11 +77,13 @@ module.exports = function (grunt) { // Builds snapshot libs within api/latest // Run this when testing examples locally against your changes before committing them - grunt.registerTask("snapshot", ["concat", "uglify"]); + grunt.registerTask("snapshot", ["concat", "uglify", "copy:plugins"]); // Build a package within ./build // Assigns the package the current version number that's defined in package.json - grunt.registerTask("build", ["snapshot", "copy"]); + grunt.registerTask("build", ["snapshot", "copy-build"]); + + grunt.registerTask("copy-build", ["copy:minified", "copy:unminified"]) grunt.registerTask("default", "snapshot"); }; diff --git a/api/latest/plugins.zip b/api/latest/plugins.zip deleted file mode 100644 index 6c951166..00000000 Binary files a/api/latest/plugins.zip and /dev/null differ diff --git a/api/latest/scenejs.zip b/api/latest/scenejs.zip deleted file mode 100644 index 8db97d1d..00000000 Binary files a/api/latest/scenejs.zip and /dev/null differ