mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Generate source map for concat. Remove comments except banner for min.
This commit is contained in:
parent
baaadad34d
commit
c17f22f82b
21
Gruntfile.js
21
Gruntfile.js
@ -57,6 +57,12 @@ module.exports = function(grunt) {
|
|||||||
"src/world.js"
|
"src/world.js"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
var banner = "//! <%= pkg.name %> <%= pkg.version %>\n" +
|
||||||
|
"//! Built on <%= grunt.template.today('yyyy-mm-dd') %>\n" +
|
||||||
|
"//! Git commit: <%= gitInfo %>\n" +
|
||||||
|
"//! http://openseadragon.github.io\n" +
|
||||||
|
"//! License: http://openseadragon.github.io/license/\n\n";
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
grunt.event.once('git-describe', function (rev) {
|
grunt.event.once('git-describe', function (rev) {
|
||||||
grunt.config.set('gitInfo', rev);
|
grunt.config.set('gitInfo', rev);
|
||||||
@ -85,12 +91,9 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
concat: {
|
concat: {
|
||||||
options: {
|
options: {
|
||||||
banner: "//! <%= pkg.name %> <%= pkg.version %>\n" +
|
banner: banner,
|
||||||
"//! Built on <%= grunt.template.today('yyyy-mm-dd') %>\n" +
|
process: true,
|
||||||
"//! Git commit: <%= gitInfo %>\n" +
|
sourceMap: true
|
||||||
"//! http://openseadragon.github.io\n" +
|
|
||||||
"//! License: http://openseadragon.github.io/license/\n\n",
|
|
||||||
process: true
|
|
||||||
},
|
},
|
||||||
dist: {
|
dist: {
|
||||||
src: [ "<banner>" ].concat(sources),
|
src: [ "<banner>" ].concat(sources),
|
||||||
@ -111,9 +114,11 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
uglify: {
|
uglify: {
|
||||||
options: {
|
options: {
|
||||||
preserveComments: "some",
|
preserveComments: false,
|
||||||
|
banner: banner,
|
||||||
sourceMap: true,
|
sourceMap: true,
|
||||||
sourceMapName: 'build/openseadragon/openseadragon.min.js.map'
|
sourceMapName: 'build/openseadragon/openseadragon.min.js.map',
|
||||||
|
sourceMapIn: 'build/openseadragon/openseadragon.js.map'
|
||||||
},
|
},
|
||||||
openseadragon: {
|
openseadragon: {
|
||||||
src: [ distribution ],
|
src: [ distribution ],
|
||||||
|
Loading…
Reference in New Issue
Block a user