Hashar has submitted this change and it was merged.
Change subject: Add npm entry point
......................................................................
Add npm entry point
Also add .gitignore file.
Change-Id: If7cf6b9faa32fed6eded597c1e5af69dbb3b1db9
---
A .gitignore
A .jshintignore
M .jshintrc
M BookManagerv2.php
A Gruntfile.js
A package.json
6 files changed, 55 insertions(+), 7 deletions(-)
Approvals:
Hashar: Verified; Looks good to me, approved
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9864c75
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*~
+*.kate-swp
+.*.swp
+.project
+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
index c4e265a..2e34a4c 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -6,7 +6,7 @@
"curly": true,
"eqeqeq": true,
"immed": true,
- "latedef": true,
+ "latedef": "nofunc",
"newcap": true,
"noarg": true,
"noempty": true,
@@ -34,9 +34,9 @@
// Legacy
"nomen": true,
- "predef": [
- "mediaWiki",
- "jQuery",
- "QUnit"
- ]
+ "globals": {
+ "mediaWiki": false,
+ "jQuery": false,
+ "QUnit": false
+ }
}
diff --git a/BookManagerv2.php b/BookManagerv2.php
index 197212a..eeb4821 100644
--- a/BookManagerv2.php
+++ b/BookManagerv2.php
@@ -31,7 +31,7 @@
'name' => 'BookManagerv2',
'author' => array( 'Molly White', 'Ori Livneh' ),
'version' => '0.1.0',
- 'url' =>
'http://www.mediawiki.org/wiki/Extension:BookManagerv2',
+ 'url' =>
'https://www.mediawiki.org/wiki/Extension:BookManagerv2',
'descriptionmsg' => 'bookmanagerv2-desc',
'license-name' => 'GPL-2.0+',
);
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"
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/274810
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If7cf6b9faa32fed6eded597c1e5af69dbb3b1db9
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: JanZerebecki <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits