Build/Test Tools: Add banner to minified CSS files
Patches occasionally come in on generated files. We should be kind to new contributors and give them a hint that these files are auto generated. Props drewapicture, samuelsidler, netweb, valendesigns, kpdesign, nacin, jorbin Fixes #30666 git-svn-id: https://develop.svn.wordpress.org/trunk@41271 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
60a3676581
commit
7ac4e811b4
16
Gruntfile.js
16
Gruntfile.js
|
@ -4,6 +4,7 @@ module.exports = function(grunt) {
|
|||
fs = require( 'fs' ),
|
||||
SOURCE_DIR = 'src/',
|
||||
BUILD_DIR = 'build/',
|
||||
BANNER_TEXT = '/*! This file is auto-generated */',
|
||||
autoprefixer = require('autoprefixer'),
|
||||
mediaConfig = {},
|
||||
mediaBuilds = ['audiovideo', 'grid', 'models', 'views'];
|
||||
|
@ -59,6 +60,20 @@ module.exports = function(grunt) {
|
|||
]
|
||||
}
|
||||
},
|
||||
usebanner: {
|
||||
options: {
|
||||
position: 'top',
|
||||
banner: BANNER_TEXT,
|
||||
linebreak: true,
|
||||
},
|
||||
files: {
|
||||
src: [
|
||||
BUILD_DIR + 'wp-admin/css/*.min.css',
|
||||
BUILD_DIR + 'wp-includes/css/*.min.css',
|
||||
BUILD_DIR + 'wp-admin/css/colors/*/*.css',
|
||||
]
|
||||
}
|
||||
},
|
||||
clean: {
|
||||
all: [BUILD_DIR],
|
||||
dynamic: {
|
||||
|
@ -919,6 +934,7 @@ module.exports = function(grunt) {
|
|||
'concat:emoji',
|
||||
'includes:emoji',
|
||||
'includes:embed',
|
||||
'usebanner',
|
||||
'jsvalidate:build'
|
||||
] );
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"devDependencies": {
|
||||
"autoprefixer": "^6.5.1",
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-banner": "^0.6.0",
|
||||
"grunt-browserify": "~5.0.0",
|
||||
"grunt-contrib-clean": "~1.0.0",
|
||||
"grunt-contrib-compress": "~1.3.0",
|
||||
|
|
Loading…
Reference in New Issue