jenkins-bot has submitted this change and it was merged. Change subject: Add Grunt infrastructure for CI ......................................................................
Add Grunt infrastructure for CI * Add package.json based on Flow's * Add Gruntfile.js based on Flow's * Add .csslintrc and .jscsrc with rules to silence errors for now * Add .gitignore (!) to ignore node_modules/ Change-Id: I2db213da2f0ce77567f7968e73af9cdd6ed9da82 --- A .csslintrc A .gitignore A .jscsrc A Gruntfile.js A package.json 5 files changed, 106 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/.csslintrc b/.csslintrc new file mode 100644 index 0000000..ec188a9 --- /dev/null +++ b/.csslintrc @@ -0,0 +1,13 @@ +{ + "adjoining-classes": false, + "box-model": false, + "box-sizing": false, + "fallback-colors": false, + "ids": false, + "important": false, + "outline-none": false, + "overqualified-elements": false, + "qualified-headings": false, + "universal-selector": false, + "unqualified-attributes": false +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 0000000..294f9ce --- /dev/null +++ b/.jscsrc @@ -0,0 +1,23 @@ +{ + "preset": "wikimedia", + + "requireMultipleVarDecl": null, + "requireSpaceAfterLineComment": null, + "requireSpacesInsideParentheses": null, + "requireSpaceBeforeKeywords": null, + "disallowImplicitTypeConversion": null, + "disallowSpacesInCallExpression": null, + "disallowOperatorBeforeLineBreak": null, + "requireLineBreakAfterVariableAssignment": null, + "disallowSpaceAfterPrefixUnaryOperators": null, + + "requireSpaceAfterKeywords": null, + "requireSpacesInsideArrayBrackets": null, + "disallowQuotedKeysInObjects": null, + "disallowDanglingUnderscores": null, + "disallowSpaceAfterObjectKeys": null, + "disallowMultipleLineBreaks": null, + "requireCamelCaseOrUpperCaseIdentifiers": null, + "validateQuoteMarks": null, + "validateIndentation": null +} diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..671c76b --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,51 @@ +/*! + * Grunt file + * + * @package Flow + */ + +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-csslint' ); + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-contrib-watch' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jscs' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '*.js', + 'modules/**/*.js', + 'tests/qunit/**/*.js' + ] + }, + jscs: { + src: '<%= jshint.all %>' + }, + csslint: { + options: { + csslintrc: '.csslintrc' + }, + all: 'modules/**/*.css' + }, + banana: { + all: 'i18n/' + }, + watch: { + files: [ + '.{csslintrc,jscsrc,jshintignore,jshintrc}', + '<%= jshint.all %>', + '<%= csslint.all %>' + ], + tasks: 'test' + } + } ); + + grunt.registerTask( 'lint', [ 'jscs', 'jshint', 'csslint', 'banana' ] ); + grunt.registerTask( 'test', 'lint' ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..3332abb --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "thanks", + "version": "0.0.0", + "private": true, + "description": "Build tools for Thanks.", + "scripts": { + "test": "grunt test" + }, + "devDependencies": { + "grunt": "0.4.5", + "grunt-contrib-csslint": "0.2.0", + "grunt-contrib-jshint": "0.10.0", + "grunt-contrib-watch": "0.6.1", + "grunt-banana-checker": "0.2.0", + "grunt-jscs": "1.8.0", + "jshint": "~2.5.0" + } +} -- To view, visit https://gerrit.wikimedia.org/r/208341 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2db213da2f0ce77567f7968e73af9cdd6ed9da82 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Thanks Gerrit-Branch: master Gerrit-Owner: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits