jenkins-bot has submitted this change and it was merged. Change subject: Add support for composer/npm ......................................................................
Add support for composer/npm Adjust .gitignore Change-Id: I361a8f503e80db4713b42a8a91cd4c0048192676 --- M .gitignore A .jscsrc A .jshintignore A .jshintrc A Gruntfile.js A composer.json A package.json 7 files changed, 90 insertions(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 98b092a..f9037de 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ -.svn +/composer.lock +/node_modules/ +/vendor/ *~ *.kate-swp .*.swp diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 0000000..9d22e3f --- /dev/null +++ b/.jscsrc @@ -0,0 +1,3 @@ +{ + "preset": "wikimedia" +} diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 0000000..022b988 --- /dev/null +++ b/.jshintignore @@ -0,0 +1,2 @@ +node_modules +vendor diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..66e3d48 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,24 @@ +{ + // Enforcing + "bitwise": true, + "eqeqeq": true, + "freeze": true, + "latedef": true, + "noarg": true, + "nonew": true, + "undef": true, + "unused": true, + "strict": false, + + // Relaxing + "es5": false, + + // Environment + "browser": true, + "jquery": true, + + "globals": { + "mediaWiki": false, + "OO": false + } +} diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..9ff580c --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,35 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + /*grunt.loadNpmTasks( 'grunt-banana-checker' );*/ + grunt.loadNpmTasks( 'grunt-jscs' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '**/*.js', + '!node_modules/**' + ] + }, + jscs: { + src: '<%= jshint.all %>' + }, + /* banana: { + all: 'i18n/' + }, + */ + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint' /*'banana'*/ ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..62cc3bd --- /dev/null +++ b/composer.json @@ -0,0 +1,11 @@ +{ + "require-dev": { + "jakub-onderka/php-parallel-lint": "0.9" + }, + "scripts": { + "test": [ + "parallel-lint . --exclude vendor" + ] + } + +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..55ef33b --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "scripts": { + "test": "grunt test" + }, + "devDependencies": { + "grunt": "0.4.5", + "grunt-cli": "0.1.13", + "grunt-contrib-jshint": "0.11.3", + "grunt-jscs": "2.3.0", + "grunt-jsonlint": "1.0.6" + } +} -- To view, visit https://gerrit.wikimedia.org/r/225225 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I361a8f503e80db4713b42a8a91cd4c0048192676 Gerrit-PatchSet: 13 Gerrit-Project: mediawiki/extensions/Maintenance Gerrit-Branch: master Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com> Gerrit-Reviewer: Hashar <has...@free.fr> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits