jenkins-bot has submitted this change and it was merged.
Change subject: Add npm support, Add composer.json
......................................................................
Add npm support, Add composer.json
This will allow us to run npm test.
It will also allow us to run php code sniffer in the future.
Also add missing qqq.json messages.
Change-Id: I75573c55c716190d794599d4fd0736cdff224d03
---
M .gitignore
A .jshintignore
A Gruntfile.js
A composer.json
M i18n/qqq.json
A package.json
6 files changed, 62 insertions(+), 2 deletions(-)
Approvals:
Awight: Looks good to me, approved
jenkins-bot: Verified
diff --git a/.gitignore b/.gitignore
index 98b092a..9c7065a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
-.svn
*~
*.kate-swp
.*.swp
+/composer.lock
+/node_modules/
+/vendor/
diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 0000000..58875fd
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1,2 @@
+/node_modules
+/vendor
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..a2517cb
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,31 @@
+/*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'
+ ]
+ },
+ banana: {
+ all: 'i18n/'
+ },
+ jsonlint: {
+ all: [
+ '*.json',
+ '**/*.json',
+ '!node_modules/**',
+ '!vendor/**'
+ ]
+ }
+ } );
+
+ grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
+ grunt.registerTask( 'default', 'test' );
+};
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..f2883f7
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,10 @@
+{
+ "require-dev": {
+ "jakub-onderka/php-parallel-lint": "0.9"
+ },
+ "scripts": {
+ "test": [
+ "parallel-lint . --exclude vendor"
+ ]
+ }
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index af1a162..f87979d 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -33,7 +33,7 @@
"centralnoticelogs": "Title of Special:CentralNoticeLogs page, should
be identical to centralnotice message. (Since the extension uses a secondary
tab interface, the effective page title is actually
centralnotice-view-logs.)\n{{Identical|Central notice admin}}",
"right-centralnotice-admin": "{{doc-right|centralnotice-admin}}",
"action-centralnotice-admin": "{{doc-action|centralnotice-admin}}",
- "centralnotice-desc": "The [[mw:Extension:CentralNotice|Central Notice
extension]] allows a notice to be posted centrally to several
wikis.\n{{desc|name=Central
Notice|url=https://www.mediawiki.org/wiki/Extension:CentralNotice}}",
+ "centralnotice-desc": "The [[mw:Extension:CentralNotice|CentralNotice
extension]] allows a notice to be posted centrally to several
wikis.\n{{desc|name=CentralNotice|url=https://www.mediawiki.org/wiki/Extension:CentralNotice}}",
"centralnotice-summary": "Used as summary in
[[meta:Special:CentralNotice|CentralNotice]] special page for
[[mw:Extension:CentralNotice]]",
"centralnotice-query": "Unused at this time.",
"centralnotice-notice-name": "Used as column header of the table in
[[Special:CentralNotice]].\n{{Related|Centralnotice-th}}\n{{Identical|Campaign
name}}",
@@ -296,11 +296,13 @@
"centralnotice-set-record-impression-sample-rate": "Label for the
control to activate setting the sample rate for Special:RecordImpression, for
the legacy support campaign mixin",
"centralnotice-custom-record-impression-sample-rate": "Label for the
control to determine the sample rate for Special:RecordImpression, for the
legacy support campaign mixin",
"centralnotice-banners-not-guaranteed-to-display": "Label for the
control to indicate that banners might not display, for the legacy support
campaign mixin",
+ "centralnotice-impression-diet": "Label for the form control to set
diet name.",
"centralnotice-impression-diet-cookie-name": "Label for the form
control to set diet cookie name.",
"centralnotice-impression-diet-cookie-name-help": "Help text for form
control.",
"centralnotice-impression-diet-maximum-seen": "Label for the form
control to set maximum seen count.",
"centralnotice-impression-diet-maximum-seen-help": "Help text for form
control.",
"centralnotice-impression-diet-restart-cycle-delay": "Label for the
form control to set cycle restart delay",
+ "centralnotice-impression-diet-restart-cycle-delay-help": "Help text
for form control.",
"centralnotice-impression-diet-skip-initial": "Label for the form
control to skip initial impressions.",
"centralnotice-impression-diet-skip-initial-help": "Help text for form
control."
}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..094b8ea
--- /dev/null
+++ b/package.json
@@ -0,0 +1,13 @@
+{
+ "private": true,
+ "scripts": {
+ "test": "grunt test"
+ },
+ "devDependencies": {
+ "grunt": "0.4.5",
+ "grunt-cli": "0.1.13",
+ "grunt-contrib-jshint": "0.11.3",
+ "grunt-banana-checker": "0.2.2",
+ "grunt-jsonlint": "1.0.4"
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/243379
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I75573c55c716190d794599d4fd0736cdff224d03
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits