GithubHelp home page GithubHelp logo

mikemccarron / craftcms-grunt-devkit Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 240 KB

A Grunt development workflow designed for working in a Craft CMS build.

License: MIT License

JavaScript 100.00%

craftcms-grunt-devkit's Introduction

Grunt workflow for Craft builds.

A Grunt development workflow designed for working within a Craft (https://buildwithcraft.com) project.

Currently in Beta ("0.2.0")

Overview

This is intended to be starting point for developing websites built with Craft.

Basically, this is what this does:

  • Creates a development enviroment that includes a set of common folders and empty initial files. The files and folder structure is based on my own personal perferences but you can modified it Gruntfile.js
  • Automatically downloads the lastest version of jQuery, Modernizr, Normalize and GASP (TweenMax) from Bower.
  • Handles concatenating scripts and minifying files and images.
  • Minifies JPG, GIF, PNG, and SVG files.
  • Checks your JavaScript against with JSHint.

Thanks to all the great developers who created plugins that made this possible.

Requirements

If you're reading this then you probably have an idea of whats required to get started.

You'll need to have Node.js and NPM (Node Packaged Modules) installed.

Setup and Installation

First thing to do is install the required local dependencies:

npm install

Then setup your local build by running the following:

grunt install

Grunt Tasks

  • grunt install โ€” Runs setup script - which creates a development folder, sub folders for js, fonts, sass, and img. Creates new split .scss files and new scripts.js. Downloads latest versions of common libraies from Bower, download normalize.scss and move it into the sass folder. Remove Bower folder. Copies all files and directories into the Craft public folder. This will not transfer Sass files or the Sass folder. Finally, it renders a inital copy of styles.css to public/css/.
  • grunt (default) โ€” Watches for SASS and JS changes. Rendered minified version to the public folder. JavaScript is stripped of all console.logs calls. When new images are added to development/img/, those images are copied to the the public folder and minified.

craftcms-grunt-devkit's People

Contributors

mikemccarron-1tp avatar mikemccarron avatar

Stargazers

Joseph Bergdoll avatar Jonathan Forby avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.