Grunt publish now publishes into the new folder in site-build

This commit is contained in:
Ian Gilman 2013-03-25 10:02:41 -07:00
parent f792af9eb9
commit 6c4643d447

View File

@ -14,6 +14,7 @@ module.exports = function(grunt) {
// ----------
var distribution = "build/openseadragon/openseadragon.js",
minified = "build/openseadragon/openseadragon.min.js",
releaseRoot = "../site-build/built-openseadragon/",
sources = [
"src/openseadragon.js",
"src/fullscreen.js",
@ -52,11 +53,7 @@ module.exports = function(grunt) {
clean: {
build: ["build"],
release: {
src: [
"../site-build/openseadragon",
"../site-build/openseadragon.zip",
"../site-build/openseadragon.tar"
],
src: [releaseRoot],
options: {
force: true
}
@ -155,10 +152,10 @@ module.exports = function(grunt) {
// ----------
// Copy:release task.
// Copies the contents of the build folder into ../site-build.
// Copies the contents of the build folder into the release folder.
grunt.registerTask("copy:release", function() {
grunt.file.recurse("build", function(abspath, rootdir, subdir, filename) {
var dest = "../site-build/"
var dest = releaseRoot
+ (subdir ? subdir + "/" : '/')
+ filename;
@ -185,7 +182,7 @@ module.exports = function(grunt) {
// ----------
// Publish task.
// Cleans the built files out of ../site-build and copies newly built ones over.
// Cleans the built files out of the release folder and copies newly built ones over.
grunt.registerTask("publish", ["package", "clean:release", "copy:release"]);
// ----------