jenkins-bot has submitted this change and it was merged. Change subject: Add Grunt infrastructure for CI ......................................................................
Add Grunt infrastructure for CI * Update package.json based on Flow's * Add Gruntfile.js based on Flow's * Add .csslintrc and .jscsrc with rules to silence errors for now Change-Id: Ia8e23537d8dccbcff9ee336f667dc463590c0235 --- A .csslintrc A .jscsrc A Gruntfile.js M package.json 4 files changed, 102 insertions(+), 6 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/.jscsrc b/.jscsrc new file mode 100644 index 0000000..eb359a1 --- /dev/null +++ b/.jscsrc @@ -0,0 +1,22 @@ +{ + "preset": "wikimedia", + + "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 index 99e284d..93d079c 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,18 @@ { - "name": "Echo-dependencies", - "description": "Node.js dependencies used in Echo development", - "version": "0.0.1", - "dependencies": { - "jshint": ">=1.1.0" - } + "name": "echo", + "version": "0.0.1", + "private": true, + "description": "Build tools for Echo.", + "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/208338 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia8e23537d8dccbcff9ee336f667dc463590c0235 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org> 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