A simple Gulp environment for Kirby CMS with BrowserSync and basic compiling tasks.
- Download the latest version of Kirby CMS.
- Download this project and drop package.json and gulpfile.js in the root folder of your Kirby project.
- Install all required packages
npm install
Once you've gotten everything installed, you can use Gulp to run and build your project for deployment.
gulp serve
This will start a new server to run your project and open a new browser window to load it. It also compiles your Sass if you're using any. BrowserSync is connected, so any changes you make to your Sass, CSS, or PHP files will reload the page.
gulp build
This will build your final project for deployment. This includes compiling Sass, optimitizing images, minifying CSS and adding browser prefixes.
The gulpfile.js assumes that your Sass will be stored in /assets/sass/. If you set up your Sass files differently, update the src for the styles task in gulpfile.js.