mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Swapped grunt-cssnano for grunt-postcss+cssnano
- The grunt-cssnano plugin is old and no longer maintained - It uses insecure dependencies that don't really impact us, but we want to get rid of warnings - Swapping for grunt-postcss+cssnano is a more up-to-date way of sorting this out
This commit is contained in:
parent
5ef8e0241f
commit
a4175ff218
3 changed files with 724 additions and 463 deletions
|
@ -38,6 +38,7 @@ const configureGrunt = function (grunt) {
|
|||
//
|
||||
// Find all of the task which start with `grunt-` and load them, rather than explicitly declaring them all
|
||||
require('matchdep').filterDev(['grunt-*', '!grunt-cli']).forEach(grunt.loadNpmTasks);
|
||||
grunt.loadNpmTasks('@lodder/grunt-postcss');
|
||||
|
||||
var cfg = {
|
||||
// #### Common paths used by tasks
|
||||
|
@ -276,10 +277,12 @@ const configureGrunt = function (grunt) {
|
|||
}
|
||||
},
|
||||
|
||||
cssnano: {
|
||||
postcss: {
|
||||
prod: {
|
||||
options: {
|
||||
sourcemap: false
|
||||
processors: [
|
||||
require('cssnano')() // minify the result
|
||||
]
|
||||
},
|
||||
files: {
|
||||
'core/server/public/ghost.min.css': 'core/server/public/ghost.css'
|
||||
|
@ -542,7 +545,7 @@ const configureGrunt = function (grunt) {
|
|||
//
|
||||
// It is otherwise the same as running `grunt`, but is only used when running Ghost in the `production` env.
|
||||
grunt.registerTask('prod', 'Build JS & templates for production',
|
||||
['subgrunt:prod', 'uglify:prod', 'cssnano:prod', 'master-warn']);
|
||||
['subgrunt:prod', 'uglify:prod', 'postcss:prod', 'master-warn']);
|
||||
|
||||
// ### Live reload
|
||||
// `grunt dev` - build assets on the fly whilst developing
|
||||
|
|
|
@ -134,6 +134,8 @@
|
|||
"sqlite3": "4.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lodder/grunt-postcss": "^2.0.1",
|
||||
"cssnano": "^4.1.10",
|
||||
"eslint": "6.8.0",
|
||||
"eslint-plugin-ghost": "1.0.1",
|
||||
"grunt": "1.1.0",
|
||||
|
@ -145,7 +147,6 @@
|
|||
"grunt-contrib-symlink": "1.0.0",
|
||||
"grunt-contrib-uglify": "4.0.1",
|
||||
"grunt-contrib-watch": "1.1.0",
|
||||
"grunt-cssnano": "3.0.0",
|
||||
"grunt-express-server": "0.5.4",
|
||||
"grunt-mocha-cli": "6.0.0",
|
||||
"grunt-shell": "3.0.1",
|
||||
|
|
Loading…
Add table
Reference in a new issue