Skip to content
This repository has been archived by the owner on Sep 23, 2019. It is now read-only.
/ craft-gulp Public archive

🎨 Craft CMS + SCSS + JS + Gulp > A full set of build-tools for Craft website developers

License

Notifications You must be signed in to change notification settings

ben-rogerson/craft-gulp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

craft-gulp

This repo is still kept current but perhaps you could try out my newer Webpack-mix config. You can still integrate it with Craft - instructions in the readme.

An agency-battletested production-ready boilerplate to help you get you started in Craft CMS 3.

Getting started

This process will get you setup with a new project locally.

  1. Create a local database for your new project (Sequel Pro is a good choice)
  2. In your terminal, cd/TO/YOUR/PROJECTS/DIRECTORY and create a new project with this boilerplate:
    create-project ben-rogerson/craft-gulp --stability dev PROJECT_NAME
    and run the ./craft setup command thatÕšs mentioned at the end
  3. Open your project directory and install the packages
    cd PROJECT_NAME && npm i
  4. Activate the asset-rev plugin ./craft install/plugin assetrev
  5. Add a link with Valet or Homestead to the public folder [ valet link PROJECT_NAME ]
  6. Open PROJECT_NAME/package.json and update the dev url in config.devUrl
  7. Start your dev server with npm start
  8. Code like a pro.

Be sure to enable the rest of the installed plugins within Craft.

Boilerplate Features

Development

npm start

  • Automatic updates with Browsersync
  • Cachebusting with Querystring
  • SCSS
    • Breakpoint Display Helper
    • Autoprefixer
    • Sourcemaps
  • Javascript
    • First class ES6+ Transpiling
    • JS Modules (import/export)
    • Globals (browserify-shim)
    • Sourcemaps
  • Images
    • Compression for GIF/JPG/PNG/SVG
  • SVG Sprite Conversion
  • Favicons

Production

npm run build

  • All of the above but no Browsersync or Sourcemaps
  • Cachebusting with Manifest