Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/277546
Change subject: Add npm entry point ...................................................................... Add npm entry point Change-Id: I86e3f1d5a8ae56a426ab1eb648332487478df139 --- M .gitignore A .jshintignore A .jshintrc A Gruntfile.js A package.json M resources/ext.biblioPlus.qtip.config.js 6 files changed, 71 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BiblioPlus refs/changes/46/277546/1 diff --git a/.gitignore b/.gitignore index 98b092a..1689d7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.svn *~ *.kate-swp .*.swp +node_modules/** diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +node_modules diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..04c3a97 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,23 @@ +{ + // Enforcing + "bitwise": true, + "eqeqeq": true, + "freeze": true, + "latedef": "nofunc", + "noarg": true, + "nonew": true, + "undef": true, + "unused": true, + "strict": false, + + // Relaxing + "es5": false, + + // Environment + "browser": true, + "jquery": true, + + "globals": { + "mediaWiki": false + } +} diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..36b6671 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,30 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '**/*.js', + '!node_modules/**' + ] + }, + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..ec97d7b --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "scripts": { + "test": "grunt test" + }, + "devDependencies": { + "grunt": "0.4.5", + "grunt-cli": "0.1.13", + "grunt-banana-checker": "0.4.0", + "grunt-contrib-jshint": "1.0.0", + "grunt-jsonlint": "1.0.7" + } +} diff --git a/resources/ext.biblioPlus.qtip.config.js b/resources/ext.biblioPlus.qtip.config.js index 1b53dd6..1909ec8 100644 --- a/resources/ext.biblioPlus.qtip.config.js +++ b/resources/ext.biblioPlus.qtip.config.js @@ -1,11 +1,11 @@ jQuery( document ).ready( function () { var key; - $( '.tooltip-from-element' ).qtip ( { + jQuery( '.tooltip-from-element' ).qtip ( { content: { text: function( api ) { - key = $( this ).attr( 'href' ); - ref = $( key ).html(); + key = jQuery( this ).attr( 'href' ); + ref = jQuery( key ).html(); if ( ref.length !== 0 ) { return ref; } @@ -20,7 +20,7 @@ delay: 500 }, position: { - viewport: $( window ), + viewport: jQuery( window ), my: 'top left', at: 'bottom center', adjust: { -- To view, visit https://gerrit.wikimedia.org/r/277546 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86e3f1d5a8ae56a426ab1eb648332487478df139 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BiblioPlus Gerrit-Branch: master Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits