When I was developing a wordpress theme using _s (Underscore), I need:
- auto compiling
.scss
to.css
on save, - auto refreshing browser. Here stores some key files.
The files mainly come from a course on Lynda.com (the course is deprecated. I searched it out on google) which is about _s.
WordPress: Building Themes from Scratch Using Underscores by Morten Rand-Hendriksen @mor10
But the packages are quite old. While running in Sep, 2020, meets so many inconsistancy and vulnerabilities.
I don't know where to find new ways to meet my needs, so I tried to repair it.
It works just fine.
- Under 'themes' folder of Wordpress site, create a new folder, name it what ever you want, by convention, I name it 'gulp-dev'.
- Put
Gulpfile.js
andpackage.json
into the folder. - Change placeholders near
line 1
andline 68
ofGulpfile.js
- Go to the folder in terminal.
npm install
gulp