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

Commit

Permalink
Much better versioning and hooks removal.
Browse files Browse the repository at this point in the history
Remove hooks as we prepare to port over to the new build system on the new website.
Also inprove the way qTip is versioned using the build scripts
  • Loading branch information
Craga89 committed Dec 31, 2012
1 parent b5360ad commit 9186d48
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 59 deletions.
15 changes: 12 additions & 3 deletions dist/basic/jquery.qtip.css
@@ -1,6 +1,15 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-12-21
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */
/*!
* qTip2 - Pretty powerful tooltips - v2.0.1
* http://qtip2.com
*
* Copyright (c) 2012 Craig Michael Thompson
* Released under the MIT, GPL licenses
* http://jquery.org/license
*
* Date: Mon Dec 31 2012 02:55 GMT+0000
* Plugins: svg ajax tips modal viewport imagemap ie6
* Styles: basic css3
*/

/* Core qTip styles */
.qtip, .qtip{
Expand Down
17 changes: 13 additions & 4 deletions dist/basic/jquery.qtip.js
@@ -1,6 +1,15 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-12-21
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */
/*!
* qTip2 - Pretty powerful tooltips - v2.0.1
* http://qtip2.com
*
* Copyright (c) 2012 Craig Michael Thompson
* Released under the MIT, GPL licenses
* http://jquery.org/license
*
* Date: Mon Dec 31 2012 02:55 GMT+0000
* Plugins: svg ajax tips modal viewport imagemap ie6
* Styles: basic css3
*/

/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
/*global window: false, jQuery: false, console: false, define: false */
Expand Down Expand Up @@ -1726,7 +1735,7 @@ if(!$.ui) {
}

// Set global qTip properties
QTIP.version = '2.0.0-nightly-15f5c6bc20';
QTIP.version = '2.0.1';
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.

15 changes: 12 additions & 3 deletions dist/jquery.qtip.css
@@ -1,6 +1,15 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-12-21
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */
/*!
* qTip2 - Pretty powerful tooltips - v2.0.1
* http://qtip2.com
*
* Copyright (c) 2012 Craig Michael Thompson
* Released under the MIT, GPL licenses
* http://jquery.org/license
*
* Date: Mon Dec 31 2012 02:55 GMT+0000
* Plugins: svg ajax tips modal viewport imagemap ie6
* Styles: basic css3
*/

/* Core qTip styles */
.qtip, .qtip{
Expand Down
17 changes: 13 additions & 4 deletions dist/jquery.qtip.js
@@ -1,6 +1,15 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-12-21
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */
/*!
* qTip2 - Pretty powerful tooltips - v2.0.1
* http://qtip2.com
*
* Copyright (c) 2012 Craig Michael Thompson
* Released under the MIT, GPL licenses
* http://jquery.org/license
*
* Date: Mon Dec 31 2012 02:55 GMT+0000
* Plugins: svg ajax tips modal viewport imagemap ie6
* Styles: basic css3
*/

/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
/*global window: false, jQuery: false, console: false, define: false */
Expand Down Expand Up @@ -1726,7 +1735,7 @@ if(!$.ui) {
}

// Set global qTip properties
QTIP.version = '2.0.0-nightly-15f5c6bc20';
QTIP.version = '2.0.1';
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.

79 changes: 51 additions & 28 deletions grunt.js
Expand Up @@ -10,14 +10,18 @@ module.exports = function(grunt) {
pkg: '<json:package.json>',
meta: {
banners: {
full: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */',

min:'/*! <%= pkg.name %> v<%= pkg.version %> | <%= pkg.homepage %> | '+
'Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
full: '/*!\n * <%= pkg.title || pkg.name %> - @vVERSION\n' +
' * <%=pkg.homepage%>\n' +
' *\n' +
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>\n' +
' * Released under the <%= _.pluck(pkg.licenses, "type").join(", ") %> licenses\n' +
' * http://jquery.org/license\n' +
' *\n' +
' * Date: <%= grunt.template.today("ddd mmm d yyyy hh:MM Zo", true) %>\n' +
'@BUILDPROPS */',

min:'/*! <%= pkg.name %> @vVERSION @MINBUILDPROPS| <%= pkg.homepage.replace("http://","") %> | '+
'Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> | <%=grunt.template.today() %> */'
}
},

Expand Down Expand Up @@ -92,7 +96,7 @@ module.exports = function(grunt) {
},
replace: {
dist: {
src: '<%=dirs.dist%>/**/*.js',
src: '<%=dirs.dist%>/**/*',
overwrite: true
}
},
Expand Down Expand Up @@ -127,10 +131,13 @@ module.exports = function(grunt) {

// Parse command line options
grunt.registerTask('init', 'Default build', function() {
var done = this.async();

if(grunt.config('concat.dist.src')) { return; } // Only do it once

// Grab command-line options, using valid defaults if not given
var plugins = (grunt.option('plugins') || Object.keys( grunt.config('plugins')).join(' ')).replace(/ /g, ' ').split(' '),
var stable = grunt.option('stable') === true,
plugins = (grunt.option('plugins') || Object.keys( grunt.config('plugins')).join(' ')).replace(/ /g, ' ').split(' '),
styles = (grunt.option('styles') || Object.keys( grunt.config('styles')).join(' ')).replace(/ /g, ' ').split(' '),
valid;

Expand Down Expand Up @@ -172,35 +179,51 @@ module.exports = function(grunt) {
grunt.config('clean.dist', dist + '/**/*');
}

// Output current build properties
grunt.log.write("\nBuilding " + "qTip2".green + " with " +
"plugins " + plugins.join(' ').green + " and " +
"styles " +styles.join(' ').green + "\n"
);
});

// Called post-commit
grunt.registerTask('version', 'Replace versioning/date holders in files', function(nightly) {
var done = this.async();
// Setup in-file text replacements (version, date etc)
grunt.utils.spawn({ cmd: 'git', args: ['describe'] }, function(err, sha1) {
var version = stable ? grunt.config('pkg.version') : sha1.substr(0,10);

// Get the current commit
grunt.utils.spawn({ cmd: 'git', args: ['hash-object', 'dist/jquery.qtip.js' ] }, function(err, sha1) {
var version = grunt.config('pkg.version') + (nightly !== false ? '-nightly-'+sha1.substr(0,10) : '');
grunt.config('replace.dist.replacements', [{
from: '@VERSION',
to: version
to: stable ? version : version.substr(1)
}, {
from: '@vVERSION',
to: stable ? 'v'+version : version
}, {
from: '@DATE',
to: grunt.template.today("dd-mm-yyyy")
}, {
from: '@BUILDPROPS',
to: (plugins.length ? ' * Plugins: @PLUGINS\n' : '') +
(styles.length ? ' * Styles: @STYLES\n' : '')
}, {
from: '@MINBUILDPROPS',
to: plugins[0] !== 'None' || styles[0] !== 'None' ?
'(includes: ' +
(plugins[0] !== 'None' ? '@PLUGINS' : '') +
(styles[0] !== 'None' ? ' / @STYLES' : '') + ') '
: ''
}, {
from: '@STYLES',
to: styles.length ? styles.join(' ') : ''
}, {
from: '@PLUGINS',
to: plugins.length ? plugins.join(' ') : ''
}]);

// Output current build properties
grunt.log.write("\nBuilding " + "qTip2".green + " "+version+" with " +
"plugins " + plugins.join(' ').green + " and " +
"styles " +styles.join(' ').green + "\n"
);

done();
});
});

// 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 version replace');
grunt.registerTask('default', 'init clean lint concat:dist concat:dist_css min:dist mincss:dist version replace');
grunt.registerTask('dev', 'init clean lint concat min mincss version replace');
grunt.registerTask('css', 'init clean concat:dist_css mincss:dist replace');
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');
};
6 changes: 0 additions & 6 deletions hooks/pre-commit

This file was deleted.

13 changes: 8 additions & 5 deletions package.json
@@ -1,9 +1,9 @@
{
"name": "qtip2",
"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",
"homepage": "http://craigsworks.com/projects/qtip2/",
"version": "2.0.1",
"homepage": "http://qtip2.com",
"author": {
"name": "Craig Michael Thompson",
"email": "craig@craigsworks.com",
Expand All @@ -16,14 +16,17 @@
"bugs": {
"url": "https://github.com/Craga89/qTip2/issues"
},
"scripts": {
"build": "./nod_modules/.bin/grunt"
},
"licenses": [
{
"type": "MIT",
"url": "http://craigsworks.com/projects/qtip2//blob/master/LICENSE-MIT"
"url": "http://craigsworks.com/projects/qtip2/blob/master/LICENSE-MIT"
},
{
"type": "GPL",
"url": "http://craigsworks.com/projects/qtip2//blob/master/LICENSE-GPL"
"url": "http://craigsworks.com/projects/qtip2/blob/master/LICENSE-GPL"
}
],
"dependencies": {
Expand Down

0 comments on commit 9186d48

Please sign in to comment.