Giter Club home page Giter Club logo

mixins's Introduction

Get started

  1. Install node.js and gulp globally

     npm install gulp -g
    
  2. Install npm packages. If you have problems in browser-sync install on Windows look here

     npm i
    

    If you use link of global packages:

     npm install gulp rimraf gulp-pug gulp-sass gulp-autoprefixer gulp-plumber gulp-directory-sync browser-sync gulp-concat gulp-purifycss gulp-uglify gulp-imagemin imagemin-pngquant gulp-csso gulp-sourcemaps gulp-sequence gulp-svg-sprite gulp-svgmin gulp-cheerio gulp-replace gulp-notify -g
    
     npm link gulp rimraf gulp-pug gulp-sass gulp-autoprefixer gulp-plumber gulp-directory-sync browser-sync gulp-concat gulp-purifycss gulp-uglify gulp-imagemin imagemin-pngquant gulp-csso gulp-sourcemaps gulp-sequence gulp-svg-sprite gulp-svgmin gulp-cheerio gulp-replace gulp-notify
    
  3. Let's code!

     gulp
    

How to make svg-sprite

  1. Install packages

     npm install gulp-svg-sprite gulp-svgmin gulp-cheerio gulp-replace -g
     
     npm link gulp-svg-sprite gulp-svgmin gulp-cheerio gulp-replace
    
  2. Put your icons into /assets/i/icons folder

  3. Uncomment task svgSpriteBuild

  4. Run task svgSpriteBuild

  5. Now you have sprite.svg in /assets/i/sprite folder. By default you have svg4everybody script in your js. Also you have scss file _sprite.scss for styling sprite.

  6. Add svg4everybody in your main.js file. For including icons use pug mixin "icon"

$(document).ready(function () {
	svg4everybody({});
});

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.