Giter Site home page Giter Site logo

felipeporto / wordpress-grunt-watch-minify-concat-sprite-imagemin Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 5 KB

WordPress Starter Theme with Grunt watch, minify, concat, sprite and imagemin

License: The Unlicense

PHP 43.22% JavaScript 50.30% CSS 6.48%

wordpress-grunt-watch-minify-concat-sprite-imagemin's Introduction

WordPress Starter Theme with Grunt watch, minify, concat, sprite and imagemin

No code included, just grunt config for watch files and prepare for deploy.

Features

  • Run tasks whenever watched files change
  • CSS concat
  • JS concat
  • Sprite generator
  • CSS minification
  • JS minification
  • Image minification

Usage

Only change static files (css, js, images and fonts) inside static_source folder, theys will be processed and copied to the correct destinations.

Watch

grunt watch --force

Watch for files modification and run tasks for concat, generate sprites and copy files from static_source folder to theirs correct destination.

Deploy

grunt deploy --force

Prepare files for deploy. Run tasks for concat, generate sprites, minify and copy files.

Image Sprite

Put the imagens for the sprite inside the folder static_source/images/icons and user the code below inside the style.scss file.

@include icons-sprite('see-all-authors');
width: icons-sprite-width('see-all-authors'); // optional - image width
height: icons-sprite-height('see-all-authors'); // optional - image height

JS concat (vendors files)

Put js in the folder static_source/js/vendors and user the code below in yours functions.php file.

wp_register_script( 'theme-vendors', get_template_directory_uri() . '/js/vendors.min.js');

wordpress-grunt-watch-minify-concat-sprite-imagemin's People

Contributors

felipeporto avatar

Watchers

 avatar  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.