Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Add new replace task using grunt-text-replace to correctly insert VER…
Browse files Browse the repository at this point in the history
…SION number and DATE
  • Loading branch information
Craga89 committed Nov 15, 2012
1 parent 6d5e1ca commit 92e9719
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dist/basic/jquery.qtip.css
@@ -1,4 +1,4 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-11-15
/*! qTip2 - Pretty powerful tooltips - v2.0.0rc1 - 2012-11-15
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */

Expand Down
4 changes: 2 additions & 2 deletions dist/basic/jquery.qtip.js
@@ -1,4 +1,4 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-11-15
/*! qTip2 - Pretty powerful tooltips - v2.0.0rc1 - 2012-11-15
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */

Expand Down Expand Up @@ -1705,7 +1705,7 @@ if(!$.ui) {
}

// Set global qTip properties
QTIP.version = '@VERSION';
QTIP.version = '2.0.0rc1';
QTIP.nextid = 0;
QTIP.inactiveEvents = 'click dblclick mousedown mouseup mousemove mouseleave mouseenter'.split(' ');
QTIP.zindex = 15000;
Expand Down
2 changes: 1 addition & 1 deletion dist/basic/jquery.qtip.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/basic/jquery.qtip.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jquery.qtip.css
@@ -1,4 +1,4 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-11-15
/*! qTip2 - Pretty powerful tooltips - v2.0.0rc1 - 2012-11-15
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */

Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.qtip.js
@@ -1,4 +1,4 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-11-15
/*! qTip2 - Pretty powerful tooltips - v2.0.0rc1 - 2012-11-15
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */

Expand Down Expand Up @@ -1705,7 +1705,7 @@ if(!$.ui) {
}

// Set global qTip properties
QTIP.version = '@VERSION';
QTIP.version = '2.0.0rc1';
QTIP.nextid = 0;
QTIP.inactiveEvents = 'click dblclick mousedown mouseup mousemove mouseleave mouseenter'.split(' ');
QTIP.zindex = 15000;
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.qtip.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/jquery.qtip.min.js

Large diffs are not rendered by default.

20 changes: 17 additions & 3 deletions grunt.js
Expand Up @@ -2,6 +2,7 @@
module.exports = function(grunt) {
// Load grunt helpers
grunt.loadNpmTasks('grunt-contrib');
grunt.loadNpmTasks('grunt-text-replace');

// Project configuration.
grunt.initConfig({
Expand Down Expand Up @@ -89,6 +90,19 @@ module.exports = function(grunt) {
}
}
},
replace: {
dist: {
src: '<%=dirs.dist%>/**/*.js',
overwrite: true,
replacements: [{
from: '@VERSION',
to: '<%= pkg.version %>'
}, {
from: '@DATE',
to: '<%= grunt.template.today("yyyy") %>'
}]
}
},
lint: {
beforeconcat: ['grunt.js', '<%=dirs.src%>/core.js', '<%=dirs.src%>/*/*.js']
},
Expand Down Expand Up @@ -174,7 +188,7 @@ module.exports = function(grunt) {

// Setup all other tasks
grunt.registerTask('css', 'init clean concat:dist_css mincss:dist');
grunt.registerTask('basic', 'init clean lint concat:basic concat:basic_css min:basic mincss:basic');
grunt.registerTask('default', 'init clean lint concat:dist concat:dist_css min:dist mincss:dist');
grunt.registerTask('dev', 'init clean lint concat min mincss');
grunt.registerTask('basic', 'init clean lint concat:basic concat:basic_css min:basic mincss:basic replace');
grunt.registerTask('default', 'init clean lint concat:dist concat:dist_css min:dist mincss:dist replace');
grunt.registerTask('dev', 'init clean lint concat min mincss replace');
};
2 changes: 1 addition & 1 deletion qtip2.jquery.json
Expand Up @@ -2,7 +2,7 @@
"name": "qTip2",
"title": "qTip2 - Pretty powerful tooltips",
"description": "Introducing... qTip2. The second generation of the advanced qTip plugin for the ever popular jQuery framework.",
"version": "2.0.0",
"version": "2.0.0rc1",
"homepage": "http://craigsworks.com/projects/qtip2/",
"author": {
"name": "Craig Michael Thompson",
Expand Down

0 comments on commit 92e9719

Please sign in to comment.