build: Organise Gruntfile.js more consistently

This also adds linting for skinStyles, with a few fixes to make these pass.

Change-Id: Id26b0bad21850d985eaaceda24fa50ad6f886458
This commit is contained in:
James D. Forrester 2017-10-31 14:41:23 -07:00
parent dec165bf37
commit c87cbc7474
4 changed files with 28 additions and 24 deletions

View File

@ -13,10 +13,10 @@ module.exports = function ( grunt ) {
eslint: { eslint: {
all: [ all: [
'**/*.js', '**/*.js',
'!libs/**',
'!vendor/**',
'!docs/**', '!docs/**',
'!node_modules/**' '!libs/**',
'!node_modules/**',
'!vendor/**'
] ]
}, },
stylelint: { stylelint: {
@ -24,17 +24,30 @@ module.exports = function ( grunt ) {
syntax: 'less' syntax: 'less'
}, },
all: [ all: [
'minerva.less/**/*.less', '**/*.less',
'resources/**/*.less' '!docs/**',
'!libs/**',
'!node_modules/**',
'!vendor/**'
] ]
}, },
jsonlint: {
all: [
'**/*.json',
'!docs/**',
'!libs/**',
'!node_modules/**',
'!vendor/**'
]
},
banana: conf.MessagesDirs,
watch: { watch: {
lint: { lint: {
files: [ 'resources/**/*.js', 'tests/qunit/**/*.js' ], files: [ '{resources,tests/qunit}/**/*.{js,less}' ],
tasks: [ 'lint' ] tasks: [ 'lint' ]
}, },
scripts: { scripts: {
files: [ 'resources/**/*.js', 'tests/qunit/**/*.js' ], files: [ '{resources,tests/qunit}/**/*.js' ],
tasks: [ 'test' ] tasks: [ 'test' ]
}, },
configFiles: { configFiles: {
@ -43,19 +56,10 @@ module.exports = function ( grunt ) {
reload: true reload: true
} }
} }
},
banana: conf.MessagesDirs,
jsonlint: {
all: [
'*.json',
'**/*.json',
'!node_modules/**',
'!vendor/**'
]
} }
} ); } );
grunt.registerTask( 'lint', [ 'eslint', 'jsonlint', 'banana', 'stylelint' ] ); grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'test', [ 'lint' ] ); grunt.registerTask( 'test', [ 'lint' ] );
grunt.registerTask( 'default', [ 'test' ] ); grunt.registerTask( 'default', [ 'test' ] );

View File

@ -1,4 +1,4 @@
@import 'minerva.variables.less'; @import 'minerva.variables.less';
/** /**
* This tweaks the default mediawiki.hlist module to provide performance optimisations * This tweaks the default mediawiki.hlist module to provide performance optimisations
@ -7,7 +7,7 @@
// FIXME: to support hlists on enwiki projects - this should be deprecated // FIXME: to support hlists on enwiki projects - this should be deprecated
.hlist > ul, .hlist > ul,
.hlist > dl,.hlist > ul, .hlist > dl,
// Horizontal Lists // Horizontal Lists
// //
// Use hlist class when dealing with lists where items should be horizontal. // Use hlist class when dealing with lists where items should be horizontal.

View File

@ -46,4 +46,4 @@
border: solid 1px @colorFieldBorder; border: solid 1px @colorFieldBorder;
padding: 8px; padding: 8px;
} }
} }

View File

@ -4,6 +4,10 @@
.overlay { .overlay {
padding-top: @headerHeight; padding-top: @headerHeight;
> ul, button {
width: @headerHeight;
}
.license { .license {
.secondary-text(); .secondary-text();
} }
@ -18,10 +22,6 @@
.slider-button { .slider-button {
top: @headerHeight; top: @headerHeight;
} }
> ul, button {
width: @headerHeight;
}
} }
@media all and ( min-width: @width-breakpoint-desktop ) { @media all and ( min-width: @width-breakpoint-desktop ) {