Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding manifest task for plugins site, updating readme to make a down…

…load link easier to generate
  • Loading branch information...
commit ebb8969abe3ceacdbb49d8b9ce7367f5de0b2830 1 parent a51cd42
@gnarf gnarf authored
Showing with 65 additions and 11 deletions.
  1. +36 −10 Gruntfile.js
  2. +3 −1 README.md
  3. +26 −0 migrate.jquery.json
View
46 Gruntfile.js
@@ -5,7 +5,7 @@ module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
- pkg: grunt.file.readJSON("package.json"),
+ pkg: grunt.file.readJSON("package.json"),
files: [
"src/intro.js",
"src/migrate.js",
@@ -16,10 +16,10 @@ module.exports = function(grunt) {
"src/event.js",
"src/outro.js"
],
- banners: {
+ banners: {
tiny: "/*! <%= pkg.name %> <%= pkg.version %> - <%= pkg.homepage %> */"
- },
- concat: {
+ },
+ concat: {
options: {
banner: "/*!\n * <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
"<%= grunt.template.today('yyyy-mm-dd') %>\n" +
@@ -31,11 +31,11 @@ module.exports = function(grunt) {
src: "<%= files %>",
dest: "dist/<%= pkg.name %>.js"
}
- },
- qunit: {
- files: [ "test/**/*.html" ]
- },
- jshint: {
+ },
+ qunit: {
+ files: [ "test/**/*.html" ]
+ },
+ jshint: {
dist: {
src: [ "dist/jquery-migrate.js" ],
options: {
@@ -70,7 +70,7 @@ module.exports = function(grunt) {
}
}
- });
+ });
// Load grunt tasks from NPM packages
grunt.loadNpmTasks("grunt-git-authors");
@@ -83,4 +83,30 @@ module.exports = function(grunt) {
// Default task.
grunt.registerTask( "default", [ "concat", "uglify", "jshint", "qunit" ] );
+ grunt.registerTask( "manifest", function() {
+ var pkg = grunt.config( "pkg" );
+ grunt.file.write( "migrate.jquery.json", JSON.stringify({
+ name: "migrate",
+ title: pkg.title,
+ description: pkg.description,
+ keywords: pkg.keywords,
+ version: pkg.version,
+ author: {
+ name: pkg.author.name,
+ url: pkg.author.url.replace( "master", pkg.version )
+ },
+ maintainers: pkg.maintainers,
+ licenses: pkg.licenses.map(function( license ) {
+ license.url = license.url.replace( "master", pkg.version );
+ return license;
+ }),
+ bugs: pkg.bugs,
+ homepage: pkg.homepage,
+ docs: pkg.homepage,
+ download: "https://github.com/jquery/jquery-migrate/blob/" + pkg.version + "/README.md#download",
+ dependencies: {
+ jquery: ">=1.6.4"
+ }
+ }, null, "\t" ) );
+ });
};
View
4 README.md
@@ -26,7 +26,9 @@ In your web page, make sure to load this plugin *after* the script for jQuery:
The plugin can be included with versions of jQuery as old as 1.6.4 as a migration tool to identify potential upgrade issues. However, the plugin is only required for version 1.9 or higher to restore deprecated and removed functionality.
-## Development vs. Production versions
+## Download
+
+### Development vs. Production versions
To make it easier for jQuery developers to find and remove deprecated functionality, the development version of the plugin displays warnings on the browser's console. In browsers that don't support the console interface such as IE7, no messages are generated unless you include a debugging library such as [Firebug Lite](https://getfirebug.com/firebuglite) before including the jQuery Migrate plugin. Developers can also inspect the `jQuery.migrateWarnings` array to see what error messages have been generated.
View
26 migrate.jquery.json
@@ -0,0 +1,26 @@
+{
+ "name": "migrate",
+ "title": "jQuery Migrate",
+ "description": "Migrate older jQuery code to jQuery 1.9+",
+ "keywords": [],
+ "version": "1.0.0",
+ "author": {
+ "name": "jQuery Foundation, Inc. and other contributors",
+ "url": "https://github.com/jquery/jquery-migrate/blob/1.0.0/AUTHORS.txt"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/jquery/jquery-migrate/blob/1.0.0/LICENSE-MIT"
+ }
+ ],
+ "bugs": {
+ "url": "http://bugs.jquery.com/"
+ },
+ "homepage": "https://github.com/jquery/jquery-migrate",
+ "docs": "https://github.com/jquery/jquery-migrate",
+ "download": "https://github.com/jquery/jquery-migrate/blob/1.0.0/README.md#download",
+ "dependencies": {
+ "jquery": ">=1.8"
+ }
+}

0 comments on commit ebb8969

Please sign in to comment.
Something went wrong with that request. Please try again.