mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateStyles
synced 2024-11-27 17:50:29 +00:00
31743445bd
This extension adds a <templatestyles> tag that, when placed on a template, allows specifying CSS for pages where that template is transcluded. Unlike inline styles, the per-template CSS supports rules with proper selectors, and @media blocks. THIS VERSION DOES NOT CURRENTLY FILTER DECLARATIONS and is therefore unsuitable for wikis where unprivileged users should not be allowed to influcence the pagewide CSS in unrestricted ways! Bug: T483 Change-Id: Ibc1cae3079d164f7ac7bcc7c4ded3f02bb048614
36 lines
653 B
JavaScript
36 lines
653 B
JavaScript
/*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',
|
|
'**/*.json',
|
|
'!node_modules/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|