mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-23 22:44:42 +00:00
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
This commit is contained in:
parent
c7889f2e91
commit
8b9bc3a44f
13
.csslintrc
Normal file
13
.csslintrc
Normal file
|
@ -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
|
||||||
|
}
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
23
.jscsrc
Normal file
23
.jscsrc
Normal file
|
@ -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
|
||||||
|
}
|
51
Gruntfile.js
Normal file
51
Gruntfile.js
Normal file
|
@ -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' );
|
||||||
|
};
|
18
package.json
Normal file
18
package.json
Normal file
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue