jenkins-bot has submitted this change and it was merged.
Change subject: Add npm entry point
......................................................................
Add npm entry point
Change-Id: Ib3a91d9f5827def8f8fef58f2db18dde824c2697
---
M .gitignore
M DisqusTag.js
A Gruntfile.js
A package.json
4 files changed, 38 insertions(+), 6 deletions(-)
Approvals:
Hashar: Looks good to me, approved
jenkins-bot: Verified
diff --git a/.gitignore b/.gitignore
index e43b0f9..85dd063 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
.DS_Store
+node_modules/**
diff --git a/DisqusTag.js b/DisqusTag.js
index e6b0ade..5f5747a 100644
--- a/DisqusTag.js
+++ b/DisqusTag.js
@@ -1,23 +1,23 @@
window.showDisqusDialog = function( id ) {
- $( '#disqus_dialog' ).dialog({ 'width': 800, 'position': 'top' });
+ jQuery( '#disqus_dialog' ).dialog( { 'width': 800, 'position': 'top' }
);
var identifier = url = location.protocol + '//' + location.hostname +
location.pathname + '#!' + id
//Reset Disqus to show the thread corresponding to the clicked button
- DISQUS.reset({
+ DISQUS.reset( {
reload: true,
config: function () {
this.page.identifier = identifier;
this.page.url = url;
}
- });
+ } );
}
-$(function() {
+jQuery( function() {
var disqus = document.createElement( 'script' );
disqus.type = 'text/javascript';
disqus.async = true;
disqus.src = '//' + egDisqusShortname + '.disqus.com/embed.js';
- document.getElementsByTagName( 'body' )[0].appendChild( disqus );
-});
\ No newline at end of file
+ document.getElementsByTagName( 'body' )[ 0 ].appendChild( disqus );
+} );
\ No newline at end of file
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+ grunt.loadNpmTasks( 'grunt-jsonlint' );
+ grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+ grunt.initConfig( {
+ banana: {
+ all: 'i18n/'
+ },
+ jsonlint: {
+ all: [
+ '**/*.json',
+ '!node_modules/**'
+ ]
+ }
+ } );
+
+ grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+ grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+ "scripts": {
+ "test": "grunt test"
+ },
+ "devDependencies": {
+ "grunt": "0.4.5",
+ "grunt-cli": "0.1.13",
+ "grunt-banana-checker": "0.4.0",
+ "grunt-jsonlint": "1.0.7"
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/279556
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3a91d9f5827def8f8fef58f2db18dde824c2697
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DisqusTag
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits