All Projects → AdFabConnect → adfab-gulp-boilerplate

AdFabConnect / adfab-gulp-boilerplate

Licence: ISC license
A boilerplate including Gulp, Less/SASS, BrowserSync.

Programming Languages

javascript
184084 projects - #8 most used programming language
SCSS
7915 projects
Less
1899 projects

Projects that are alternatives of or similar to adfab-gulp-boilerplate

magento-2-gulp
Gulp for Magento 2. It works with core Magento styles (less) and structure. Uses default theme configs from dev/tools/grunt/configs/local-themes.js.
Stars: ✭ 37 (+117.65%)
Mutual labels:  gulp, less, browsersync
Gulp Pug Sass Seed
🍹 A Pug and Sass starter project using gulp for task automation.
Stars: ✭ 84 (+394.12%)
Mutual labels:  gulp, browsersync
Forward-Framework
A killer WordPress theme framework built using underscores, gulp, sass, bourbon neat, bower & browsersync.
Stars: ✭ 23 (+35.29%)
Mutual labels:  gulp, browsersync
Web Starter Kit
Web Starter Kit is an opinionated boilerplate for web development. A solid starting point for both professionals and newcomers to the industry.
Stars: ✭ 130 (+664.71%)
Mutual labels:  gulp, browsersync
Wordpress Starter
📦 A starter template for WordPress websites
Stars: ✭ 26 (+52.94%)
Mutual labels:  gulp, browsersync
Generator Fountain Webapp
Yeoman 'fountain' generator to start a webapp
Stars: ✭ 985 (+5694.12%)
Mutual labels:  gulp, browsersync
Bootstrap 4 Sass Gulp 4 Boilerplate
A Bootstrap 4.5.2 boilerplate with font-awesome, sass, gulp 4 tasks
Stars: ✭ 103 (+505.88%)
Mutual labels:  gulp, browsersync
Long Haul
A minimal, type-focused Jekyll theme.
Stars: ✭ 524 (+2982.35%)
Mutual labels:  gulp, browsersync
Glup
Some of the gulp tutorial -《gulp笔记》
Stars: ✭ 136 (+700%)
Mutual labels:  gulp, less
Generator Phaser Plus
[🛑 DISCONTINUED] It has been a long journey but development of `generator-phaser-plus` is now over. I recommend you have a look and fork `yandeu/phaser-project-template` instead.
Stars: ✭ 148 (+770.59%)
Mutual labels:  gulp, browsersync
Bootstrap 4 Boilerplate
Bootstrap 4.3.1 boilerplate with Browsersync, Sass and Gulp.js
Stars: ✭ 155 (+811.76%)
Mutual labels:  gulp, browsersync
Manhuaren
vue2.0全家桶,仿漫画人官网(移动端)
Stars: ✭ 18 (+5.88%)
Mutual labels:  gulp, less
Blendid
A delicious blend of gulp tasks combined into a configurable asset pipeline and static site builder
Stars: ✭ 5,026 (+29464.71%)
Mutual labels:  gulp, browsersync
Fastshell
Fiercely quick front-end boilerplate and workflows, HTML5, Gulp, Sass
Stars: ✭ 563 (+3211.76%)
Mutual labels:  gulp, browsersync
Compile Hero
🔰Visual Studio Code Extension For Compiling Language
Stars: ✭ 169 (+894.12%)
Mutual labels:  gulp, less
Frontie Webpack
Front-end Boilerplate | Gulp 4 + Webpack 4 + Babel + ITCSS Architecture + BEM Methodology + Twig.js
Stars: ✭ 102 (+500%)
Mutual labels:  gulp, browsersync
Gulp Tutorial
Code examples for my Gulp.js tutorial series
Stars: ✭ 383 (+2152.94%)
Mutual labels:  gulp, browsersync
Magento2 Frontools
Set of front-end tools for Magento 2 based on Gulp.js
Stars: ✭ 416 (+2347.06%)
Mutual labels:  gulp, browsersync
Gulp Starter Kit
A simple Gulp 4 Starter Kit for modern web development.
Stars: ✭ 134 (+688.24%)
Mutual labels:  gulp, less
Gopablo
🐺 Static site generator.
Stars: ✭ 166 (+876.47%)
Mutual labels:  gulp, browsersync

ADFAB Gulp Boilerplate

The goal of this Gulp boilerplate is to free you time so you can do something more interesting than reinventing the wheel.

npm version Build Status Dependency Status devDependency Status License

Features

  • Automatic reloading of the browser on code modification (using Browsersync)
  • CSS / JS Sourcemaps
  • HTML minification
  • Image minification
  • JS compilation
  • Babel transpiler (ES6 support FTW)
  • SASS or LESS compilation
  • Linting for JS, SASS and LESS
  • Desktop notifications on success and error
  • Fonticon generation
  • SVG Sprite generation
  • Copy or Concat files
  • Production mode: JS / CSS minification + sources maps removal

Installation

npm install adfab-gulp-boilerplate --save

Upon installation, two files will be copied to the root of your project: gulpfile.js and gulp-config.json.

Usage

Configure the tasks you need

Every task rely on the gulp-config.json file for their configuration. Just fill-in the values you need.

  • vhost: your local url,
  • sourceRoot: root path where your assets will be stored
  • destinationRoot: the path where your public final assets will be stored
  • tasks: the list of all tasks you want to run. See details in gulp-config.json for details of every options of below for details about how it works

Task config usage

A task uses somes common parameters:

  • source: the source folder - a string or an array of string - relative to sourceRoot
  • destination: the source folder - a string or an array of string - relative to destinationRoot
  • task: the task you want to use, if the name is not the same as your task name
  • clean: cleans destination folder of the task before copying files. So removed files from your source folder will be removed from destination folder too. default true
  • watch: while using gulp watchor gulp serve your task source files will be watched by default. You can choose to watch other files for your task instead, or set to false to stop watching files for this task

Example:

{
    "fonts": {
        "task": "copy",
        "source": "fonts/",
        "destination: "fonts/",
    }
}

That task named fonts will execute the copy task which will copy files from your source folder to your destination folder. It will clean font folder every time a file is added/removed from source folder, and will be watched.

{
    "sassadmin": {
        "task": "sass",
        "source": ["sass/admin.scss"],
        "watch": ["sass/**/*.scss"],
        "destination": "admin/css",
        "clean": false
    }
}

That task named sassadmin will execute the sass task which will compile sass to css files from your source folder to your destination folder. Destination folder wont be cleaned (as your admin css folder may contain other css files not manged by yourself). The source file is only your admin css file, but every .scss file updated from your sass folder will be watched.

Many tasks have more options we will detail in Task list overview part.

Add custom task / Override task

You can create a folder named gulp-tasks at the root of your project. In this folder you can add new tasks. If a task has the same name as a default boilerplate task, it will override it.

Task list overview

Every tasks has a desktop notification when succeeded or failed, with detailed logs.

Here is a list of current taks available:

  • copy: copy files from your source folder to destination folder
  • concat: copy files from your source folder to destination folder and concat them in a single file
  • sass: to compile scss into css file, with autoprefixer, sourcemaps for development, minify for production
  • less: as sass, but for less
  • sasslint: checks your sass code
  • lesshint: checks your less code
  • fonticon: fonticon takes all svg files in a folder to create a fonticon and a css/less/sass file to be included in your final css
  • jslibs: concatenates and uglify all your js libs into one single file
  • scripts: parse your js with babelify for es6 compatibility. adds sourcemaps for dev, uglify for production
  • eslint: checks your js code
  • views: minify your html
  • images: images optimizes image weight when copying
  • fonts: juste copy your font files
  • svgsprite: create a SVG sprite from all SVG files in a folder

Gulp usage

Build

You can use default task:

gulp

or

gulp build

To execute all the task listed in your gulp-config.json file in listed order.

Single task

You can use:

gulp <taskname>

To compile only a task fom your gulp-config.json file.

Watch

You can use:

gulp watch

To build your tasks and watch for updates to compile files

Browser live reloads

Using:

gulp serve

It start a Browsersync server.

It acts as a proxy to the domain you specified in gulp-config.json (property vhost). You can now access your project by specifying the 3000 port (if you usually access your project via http://project.localhost/, now it would be http://project.localhost:3000/).

You can also test it in production mode by passing the --production option. That way, it will remove sourcemaps and minify JS and CSS.

Development and production

Development mode (by default), adds sourcemaps to your code for js/sass.

You can run:

gulp --production

It will remove sourcemap genreration and minify your js and css.

License

ISC license.

Copyright (c) 2016-2018 ADFAB

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].