mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
Grunt publish now publishes into the new folder in site-build
This commit is contained in:
parent
f792af9eb9
commit
6c4643d447
13
Gruntfile.js
13
Gruntfile.js
@ -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"]);
|
||||
|
||||
// ----------
|
||||
|
Loading…
Reference in New Issue
Block a user