Updated to latest npm packages

This commit is contained in:
Ian Gilman 2014-06-02 11:02:22 -07:00
parent e967b3c7a3
commit 02b606680d
3 changed files with 22 additions and 27 deletions

View File

@ -52,6 +52,11 @@ module.exports = function(grunt) {
"src/viewport.js" "src/viewport.js"
]; ];
// ----------
grunt.event.once('git-describe', function (rev) {
grunt.config.set('gitInfo', rev);
});
// ---------- // ----------
// Project configuration. // Project configuration.
grunt.initConfig({ grunt.initConfig({
@ -101,12 +106,8 @@ module.exports = function(grunt) {
uglify: { uglify: {
options: { options: {
preserveComments: "some", preserveComments: "some",
sourceMap: function (filename) { sourceMap: true,
return filename.replace(/\.js$/, '.js.map'); sourceMapName: 'build/openseadragon/openseadragon.min.js.map'
},
sourceMappingURL: function (filename) {
return filename.replace(/\.js$/, '.js.map').replace('build/openseadragon/', '');
},
}, },
openseadragon: { openseadragon: {
src: [ distribution ], src: [ distribution ],
@ -161,11 +162,7 @@ module.exports = function(grunt) {
afterconcat: [ distribution ] afterconcat: [ distribution ]
}, },
"git-describe": { "git-describe": {
build: { build: {}
options: {
prop: "gitInfo"
}
}
} }
}); });

View File

@ -3,17 +3,17 @@
"version": "1.1.1", "version": "1.1.1",
"description": "Provides a smooth, zoomable user interface for HTML/Javascript.", "description": "Provides a smooth, zoomable user interface for HTML/Javascript.",
"devDependencies": { "devDependencies": {
"grunt": "~0.4.1", "grunt": "^0.4.5",
"grunt-contrib-compress": "~0.5.2", "grunt-contrib-clean": "^0.5.0",
"grunt-contrib-concat": "~0.3.0", "grunt-text-replace": "^0.3.11",
"grunt-contrib-jshint": "~0.7.2", "grunt-contrib-concat": "^0.4.0",
"grunt-contrib-uglify": "~0.2.7", "grunt-git-describe": "^2.3.2",
"grunt-contrib-qunit": "~0.3.0", "grunt-contrib-uglify": "^0.4.0",
"grunt-contrib-connect": "~0.5.0", "grunt-contrib-watch": "^0.6.1",
"grunt-contrib-watch": "~0.5.3", "grunt-contrib-qunit": "^0.5.1",
"grunt-contrib-clean": "~0.5.0", "grunt-contrib-jshint": "^0.10.0",
"grunt-git-describe": "~2.0.0", "grunt-contrib-compress": "^0.9.1",
"grunt-text-replace": "~0.3.9" "grunt-contrib-connect": "^0.7.1"
}, },
"scripts": { "scripts": {
"test": "grunt test" "test": "grunt test"

View File

@ -656,14 +656,12 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
* @property {Number} revision - The revision number. * @property {Number} revision - The revision number.
* @since 1.0.0 * @since 1.0.0
*/ */
/* jshint ignore:start */
$.version = { $.version = {
versionStr: '<%= osdVersion.versionStr %>', versionStr: '<%= osdVersion.versionStr %>',
major: <%= osdVersion.major %>, major: parseInt('<%= osdVersion.major %>', 10),
minor: <%= osdVersion.minor %>, minor: parseInt('<%= osdVersion.minor %>', 10),
revision: <%= osdVersion.revision %> revision: parseInt('<%= osdVersion.revision %>', 10)
}; };
/* jshint ignore:end */
/** /**