[wp-trac] [WordPress Trac] #30666: Add a comment to RTL and minified files for new contributors
WordPress Trac
noreply at wordpress.org
Mon Sep 21 11:30:05 UTC 2015
#30666: Add a comment to RTL and minified files for new contributors
------------------------------+-----------------------------
Reporter: SergeyBiryukov | Owner: jorbin
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: docs
------------------------------+-----------------------------
Comment (by netweb):
I've got a work-in-progress patch for this, it's piggy backing on top of
PostCSS using [https://www.npmjs.com/package/postcss-banner PostCSS
Banner], it needs a bit more work and tweaks for paths but the primary
issue as it stands is the watch task integration, once I finish up #29792
I'm more than happy to finish this off if no one beats me to it.
{{{
#!diff
diff --git Gruntfile.js Gruntfile.js
index 25069f9..7157716 100644
--- Gruntfile.js
+++ Gruntfile.js
@@ -45,6 +45,20 @@ module.exports = function(grunt) {
src: [
'wp-admin/css/colors/*/colors.css'
]
+ },
+ banner: {
+ options: {
+ processors: [
+ require('postcss-
banner')({banner: '! This file is automatically generated. '})
+ ]
+ },
+ cwd: BUILD_DIR,
+ dest: BUILD_DIR,
+ ext: '.min.css',
+ src: [
+ 'wp-admin/css/{<%= cssmin.options
["wp-admin"] %>}.css',
+ 'wp-includes/css/*.css'
+ ]
}
},
clean: {
diff --git package.json package.json
index a2a8fd6..a17d9d8 100644
--- package.json
+++ package.json
@@ -29,6 +29,7 @@
"grunt-postcss": "~0.5.4",
"grunt-rtlcss": "~1.6.0",
"grunt-sass": "~1.0.0",
- "matchdep": "~0.3.0"
+ "matchdep": "~0.3.0",
+ "postcss-banner": "~1.0.0"
}
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30666#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list