mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 17:59:25 +00:00
Added cssnano to gulp file, and disable minification unless in production
This commit is contained in:
10
gulpfile.js
10
gulpfile.js
@@ -7,8 +7,18 @@ const src = 'src/stylesheets/main.scss';
|
||||
const dest = 'public/css';
|
||||
|
||||
gulp.task('styles', () => {
|
||||
let cssnanoOptions = {
|
||||
normalizeWhitespace: false
|
||||
};
|
||||
|
||||
if (process.env.NODE_ENV === 'production')
|
||||
cssnanoOptions = {};
|
||||
|
||||
const plugins = [
|
||||
require('autoprefixer'),
|
||||
require('cssnano')({
|
||||
preset: [ 'default', cssnanoOptions ]
|
||||
})
|
||||
];
|
||||
|
||||
return gulp.src(src)
|
||||
|
||||
1226
package-lock.json
generated
1226
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -22,6 +22,7 @@
|
||||
"dependencies": {
|
||||
"bcrypt": "^5.0.1",
|
||||
"body-parser": "^1.19.1",
|
||||
"cssnano": "^5.0.17",
|
||||
"express": "^4.17.2",
|
||||
"express-handlebars": "^6.0.2",
|
||||
"express-mysql-session": "^2.1.7",
|
||||
|
||||
Reference in New Issue
Block a user