WordPress.org

Make WordPress Core

Changeset 41271


Ignore:
Timestamp:
08/19/2017 08:09:31 PM (4 years ago)
Author:
jorbin
Message:

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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Gruntfile.js

    r41062 r41271  
    55        SOURCE_DIR = 'src/',
    66        BUILD_DIR = 'build/',
     7        BANNER_TEXT = '/*! This file is auto-generated */',
    78        autoprefixer = require('autoprefixer'),
    89        mediaConfig = {},
     
    5758                src: [
    5859                    'wp-admin/css/colors/*/colors.css'
     60                ]
     61            }
     62        },
     63        usebanner: {
     64            options: {
     65                position: 'top',
     66                banner: BANNER_TEXT,
     67                linebreak: true,
     68            },
     69            files: {
     70                src: [
     71                    BUILD_DIR + 'wp-admin/css/*.min.css',
     72                    BUILD_DIR + 'wp-includes/css/*.min.css',
     73                    BUILD_DIR + 'wp-admin/css/colors/*/*.css',
    5974                ]
    6075            }
     
    920935        'includes:emoji',
    921936        'includes:embed',
     937        'usebanner',
    922938        'jsvalidate:build'
    923939    ] );
  • trunk/package.json

    r41043 r41271  
    1515    "autoprefixer": "^6.5.1",
    1616    "grunt": "~0.4.5",
     17    "grunt-banner": "^0.6.0",
    1718    "grunt-browserify": "~5.0.0",
    1819    "grunt-contrib-clean": "~1.0.0",
Note: See TracChangeset for help on using the changeset viewer.