mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
Added some section seperators to the grunt file
This commit is contained in:
parent
b986b14407
commit
e757aa2767
10
Gruntfile.js
10
Gruntfile.js
@ -1,5 +1,6 @@
|
|||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
|
|
||||||
|
// ----------
|
||||||
grunt.loadNpmTasks("grunt-contrib-compress");
|
grunt.loadNpmTasks("grunt-contrib-compress");
|
||||||
grunt.loadNpmTasks("grunt-contrib-concat");
|
grunt.loadNpmTasks("grunt-contrib-concat");
|
||||||
grunt.loadNpmTasks("grunt-contrib-jshint");
|
grunt.loadNpmTasks("grunt-contrib-jshint");
|
||||||
@ -9,6 +10,7 @@ module.exports = function(grunt) {
|
|||||||
grunt.loadNpmTasks("grunt-contrib-watch");
|
grunt.loadNpmTasks("grunt-contrib-watch");
|
||||||
grunt.loadNpmTasks("grunt-contrib-clean");
|
grunt.loadNpmTasks("grunt-contrib-clean");
|
||||||
|
|
||||||
|
// ----------
|
||||||
var distribution = "build/openseadragon/openseadragon.js",
|
var distribution = "build/openseadragon/openseadragon.js",
|
||||||
minified = "build/openseadragon/openseadragon.min.js",
|
minified = "build/openseadragon/openseadragon.min.js",
|
||||||
sources = [
|
sources = [
|
||||||
@ -42,6 +44,7 @@ module.exports = function(grunt) {
|
|||||||
"src/viewport.js"
|
"src/viewport.js"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// ----------
|
||||||
// Project configuration.
|
// Project configuration.
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
pkg: grunt.file.readJSON("package.json"),
|
pkg: grunt.file.readJSON("package.json"),
|
||||||
@ -130,6 +133,7 @@ module.exports = function(grunt) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// ----------
|
||||||
// Copy:build task.
|
// Copy:build task.
|
||||||
// Copies the image files into the appropriate location in the build folder.
|
// Copies the image files into the appropriate location in the build folder.
|
||||||
grunt.registerTask("copy:build", function() {
|
grunt.registerTask("copy:build", function() {
|
||||||
@ -138,6 +142,7 @@ module.exports = function(grunt) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// ----------
|
||||||
// Copy:release task.
|
// Copy:release task.
|
||||||
// Copies the contents of the build folder into ../site-build.
|
// Copies the contents of the build folder into ../site-build.
|
||||||
grunt.registerTask("copy:release", function() {
|
grunt.registerTask("copy:release", function() {
|
||||||
@ -150,24 +155,29 @@ module.exports = function(grunt) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// ----------
|
||||||
// Build task.
|
// Build task.
|
||||||
// Cleans out the build folder and builds the code and images into it, checking lint.
|
// Cleans out the build folder and builds the code and images into it, checking lint.
|
||||||
grunt.registerTask("build", [
|
grunt.registerTask("build", [
|
||||||
"clean:build", "jshint:beforeconcat", "concat", "jshint:afterconcat", "uglify", "copy:build"
|
"clean:build", "jshint:beforeconcat", "concat", "jshint:afterconcat", "uglify", "copy:build"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// ----------
|
||||||
// Test task.
|
// Test task.
|
||||||
// Builds and runs unit tests.
|
// Builds and runs unit tests.
|
||||||
grunt.registerTask("test", ["build", "connect", "qunit"]);
|
grunt.registerTask("test", ["build", "connect", "qunit"]);
|
||||||
|
|
||||||
|
// ----------
|
||||||
// Package task.
|
// Package task.
|
||||||
// Builds and creates the .zip and .tar files.
|
// Builds and creates the .zip and .tar files.
|
||||||
grunt.registerTask("package", ["build", "compress"]);
|
grunt.registerTask("package", ["build", "compress"]);
|
||||||
|
|
||||||
|
// ----------
|
||||||
// Publish task.
|
// Publish task.
|
||||||
// Cleans the built files out of ../site-build and copies newly built ones over.
|
// Cleans the built files out of ../site-build and copies newly built ones over.
|
||||||
grunt.registerTask("publish", ["package", "clean:release", "copy:release"]);
|
grunt.registerTask("publish", ["package", "clean:release", "copy:release"]);
|
||||||
|
|
||||||
|
// ----------
|
||||||
// Default task.
|
// Default task.
|
||||||
// Does a normal build.
|
// Does a normal build.
|
||||||
grunt.registerTask("default", ["build"]);
|
grunt.registerTask("default", ["build"]);
|
||||||
|
Loading…
Reference in New Issue
Block a user