Giter Site home page Giter Site logo

advence-liz / gulp-tutorial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kogakure/gulp-tutorial

0.0 2.0 0.0 162 KB

Code examples for my Gulp.js tutorial series

Home Page: http://stefanimhoff.de/series/gulp/

Ruby 3.49% JavaScript 47.23% CSS 34.42% HTML 14.86%

gulp-tutorial's Introduction

Maintenance GitHub Forks GitHub Stars

Introduction to Gulp.js

Tutorial

These are the files for my series Introduction to Gulp.js published on my website stefanimhoff.de.

Tutorial Overview

  1. Intro and Setup
  2. Server with BrowserSync and Configuration
  3. Build, Clean and Jekyll
  4. Creating CSS with Sass (and Compass)
  5. Bundling JavaScript with Browserify
  6. Images and Vector Fonts
  7. Base64 Encoded Images
  8. Watch for Changes
  9. Checking the Syntax of SCSS and JavaScript
  10. Generating CSS Image Sprites
  11. Production Build, Server and Jekyll
  12. Optimize CSS, JavaScript, Images and HTML
  13. Revisioning
  14. Deploying the Website with Rsync
  15. Performance Improvements with WebP and Gzip
  16. PostCSS

Preparation

Install nvm and node:

$ git clone https://github.com/creationix/nvm.git ~/.nvm
$ cd ~/.nvm
$ git checkout `git describe --abbrev=0 --tags`
$ export NVM_DIR="$HOME/.nvm/"
$ [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
nvm install 6.3.1

If you like install yarn, I provide a yarn.lock file:

brew install yarn

Install bundler:

$ gem install bundler

Install bower:

$ npm install -g bower

Installation

Clone the repository on your computer and change into the projects folder. Run:

$ bundle
$ bower install
$ npm install

To install Fontcustom you should have Homebrew installed or use another package management tool to install the dependencies:

$ brew install fontforge --with-python
$ brew install eot-utils

Setup

Open gulp/config.js and change settings if needed. Only the rsync settings need to be adjusted. Change the destination to a path on your webserver and change hostname and username.

Running Gulp.js

Three tasks are available (npm works, too):

$ yarn start
$ yarn run publish
$ yarn run deploy
  • Running yarn start will start a development server, build assets and the Jekyll site and start a watch task.
  • Running yarn run publish will copy and optimize assets and run a production build of Jekyll.
  • Running yarn run deploy will copy the generated files with Rsync to your server.

Sass, Compass or PostCSS

The current version of this tutorial uses PostCSS. If you would like to use Sass (or Compass), you can still easily access the old code in the branch ruby-sass. The new code at the time I wrote the article is available in the branch postcss. Additionally I merge it into master and will process with PostCSS in my tutorial.

Credits

This tutorial includes some files for demonstation purposes:

gulp-tutorial's People

Contributors

kogakure avatar camiloruiiz avatar blake-simpson avatar jpeg729 avatar

Watchers

James Cloos avatar zhuo.li 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.