mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
Modified OpenSeadragon.version property
Let grunt do more of the work!
This commit is contained in:
parent
cb765afea2
commit
2a1b797767
@ -55,6 +55,12 @@ module.exports = function(grunt) {
|
|||||||
// Project configuration.
|
// Project configuration.
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
pkg: packageJson,
|
pkg: packageJson,
|
||||||
|
version: {
|
||||||
|
versionStr: packageJson.version,
|
||||||
|
major: parseInt(packageJson.version.split('.')[0]),
|
||||||
|
minor: parseInt(packageJson.version.split('.')[1]),
|
||||||
|
revision: parseInt(packageJson.version.split('.')[2])
|
||||||
|
},
|
||||||
clean: {
|
clean: {
|
||||||
build: ["build"],
|
build: ["build"],
|
||||||
package: [packageDir],
|
package: [packageDir],
|
||||||
|
@ -287,18 +287,12 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
|
|||||||
* @property {Number} minor - The minor version number.
|
* @property {Number} minor - The minor version number.
|
||||||
* @property {Number} revision - The revision number.
|
* @property {Number} revision - The revision number.
|
||||||
*/
|
*/
|
||||||
$.version = (function () {
|
$.version = {
|
||||||
// The version string ('x.x.x') is filled in by the grunt concat build task
|
versionStr: '<%= version.versionStr %>',
|
||||||
// from the 'version' value in package.json
|
major: parseInt('<%= version.major %>'),
|
||||||
var versionStr = '<%= pkg.version %>',
|
minor: parseInt('<%= version.minor %>'),
|
||||||
versionComponents = versionStr.split( '.' );
|
revision: parseInt('<%= version.revision %>')
|
||||||
return {
|
};
|
||||||
versionStr: versionStr,
|
|
||||||
major: parseInt( versionComponents[ 0 ] ),
|
|
||||||
minor: parseInt( versionComponents[ 1 ] ),
|
|
||||||
revision: parseInt( versionComponents[ 2 ] )
|
|
||||||
};
|
|
||||||
}());
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -307,18 +301,18 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
var class2type = {
|
var class2type = {
|
||||||
'[object Boolean]': 'boolean',
|
'[object Boolean]': 'boolean',
|
||||||
'[object Number]': 'number',
|
'[object Number]': 'number',
|
||||||
'[object String]': 'string',
|
'[object String]': 'string',
|
||||||
'[object Function]': 'function',
|
'[object Function]': 'function',
|
||||||
'[object Array]': 'array',
|
'[object Array]': 'array',
|
||||||
'[object Date]': 'date',
|
'[object Date]': 'date',
|
||||||
'[object RegExp]': 'regexp',
|
'[object RegExp]': 'regexp',
|
||||||
'[object Object]': 'object'
|
'[object Object]': 'object'
|
||||||
},
|
},
|
||||||
// Save a reference to some core methods
|
// Save a reference to some core methods
|
||||||
toString = Object.prototype.toString,
|
toString = Object.prototype.toString,
|
||||||
hasOwn = Object.prototype.hasOwnProperty;
|
hasOwn = Object.prototype.hasOwnProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Taken from jQuery 1.6.1
|
* Taken from jQuery 1.6.1
|
||||||
|
Loading…
Reference in New Issue
Block a user