![]() ![]() Here’s how the gulpfile.js and package.json files looks like - onst gulp = require('gulp') I’ve tried using the next snippet on the package page and there’s no debug messages in the console? You’ll have to wait a few seconds while each one installs before going on to the next line. I’ve checked the CSS file it isn’t compressed. gulp-cssnano minifies your CSS files gulp-concat concatenates (combines) multiple JavaScript files into one large file gulp-uglify minifies your JavaScript files Just like before, install each package by typing these lines one by one. Hi Martyr2! Not sure why I called you Jason lol The instructions on the package page still uses task? Should I use this with gulp v4? This is how my gulpfile.js looks like - const gulp = require('gulp') Ĭonst cleanCSS = require('gulp-clean-css') I have tried adding it to my gulpfile.js but the CSS isn’t minifying? I have installed gulp-clean-css as you recommended. Gulp.watch('./*.php').on('change', browserSync.reload) Gulp.watch('./*.html').on('change', browserSync.reload) This is what my gruntfile.js looks like - const gulp = require('gulp')Ĭonst browserSync = require('browser-sync').create() Most of the structure of my gulpfile.is is from the youtube tutorial that I’ve shared and also to get wordpress working locally with grunt I used the proxy snippet in the tutorial on the other link. ![]() There seems to be old gulp tutorials using the task method and the new gulp v4 uses different techniques. What I can’t figure out is what CSS minify npm to install and how to apply it to my gulpfile.js? I am building a wordpress website locally and have managed to get gulp to work without refreshing the browser so when I save CSS, JS or PHP the browser automatically refreshes which is amazing! Hi can anyone help me add CSS minify to my gulp project? I’d also like to add JS minify & concatenate. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |