• Stars
    star
    384
  • Rank 111,726 (Top 3 %)
  • Language
    JavaScript
  • Created about 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Code examples for my Gulp.js tutorial series.

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:

More Repositories

1

gitweb-theme

An alternative theme for gitweb, strongly inspired by GitHub
CSS
548
star
2

ia-writer-template-nanzan

iA Writer Template Nanzan
CSS
20
star
3

website-django-kogakure.de

Source Code of my Django site kogakure.de
Python
19
star
4

ia-writer-template-shibui

iA Writer Template Shibui
CSS
19
star
5

website-astro-stefanimhoff.de

My personal website, portfolio, and blog. Build with Astro, Preact, and Tailwind CSS
MDX
10
star
6

dotfiles

Dotfiles
Lua
9
star
7

moinmoin-theme-kaijin

Theme "Kaijin" for MoinMoin Wiki
Python
9
star
8

book-kogakure

GitBook of my website kogakure.de
Dockerfile
9
star
9

website-jekyll-stefanimhoff.de

Source Code of my Jekyll site stefanimhoff.de
CSS
9
star
10

website-11ty-stefanimhoff.de

My personal website, portfolio, and blog. Build with Eleventy, Gulp, PostCSS, JavaScript, and Nunjucks.
CSS
8
star
11

jekyll-plugin-abbr

A simple plugin for Jekyll (or Octopress) that will surround abbreviations with <abbr> tags and a title.
Ruby
7
star
12

website-hugo-kogakure.de

kogakure.de
CSS
6
star
13

website-gatsby-stefanimhoff.de

My personal website, portfolio and blog. Build with Gatsby, TypeScript, and Styled Components.
TypeScript
5
star
14

jekyll-plugin-ampersand

A simple plugin for Jekyll (or Octopress) that surrounds all ampersand with a span to style them.
Ruby
4
star
15

dotfiles-vintage

Dotfiles ✝️ 2016-2021
Vim Script
4
star
16

font-ingo

Iga Ninja Font
4
star
17

kogakure.github.io

Github landing page
2
star
18

brave-goggles

A collection of Brave Goggles
2
star
19

raycast-scripts

My Raycast scripts
Shell
1
star
20

nix-darwin-home-manager-tutorial

Setting up an example flake using Nix, nix-darwin, and home-manager
Nix
1
star
21

nix-flake-go

A sample Nix Flake for a Go app
Nix
1
star
22

website-11ty-hamburg.stefanimhoff.de

My travel blog for walking and cycling the city of Hamburg. Build with Eleventy, Gulp, PostCSS, JavaScript, and Nunjucks.
CSS
1
star
23

website-11ty-kogakure.de

My Ninja and Ninjutsu book website. Created in 1999. The current version is the 9th iteration. Build with Eleventy, Gulp, PostCSS, JavaScript, and Nunjucks.
CSS
1
star
24

3d-models-kogakure

3D models (kogakure.de)
1
star
25

export-to-zed.nvim

Neovim plugin to export active buffers to Zed
Lua
1
star