All Projects → cferdinandi → Gulp Boilerplate

cferdinandi / Gulp Boilerplate

Licence: mit
A boilerplate for building web projects with Gulp.js.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Gulp Boilerplate

Fastshell
Fiercely quick front-end boilerplate and workflows, HTML5, Gulp, Sass
Stars: ✭ 563 (-32.98%)
Mutual labels:  gulp, boilerplate, sass
Pug Sass Boilerplate Starter Kit
A Front-end template for building web apps or sites using Pug(Jade) and Sass
Stars: ✭ 92 (-89.05%)
Mutual labels:  gulp, boilerplate, sass
Fast
Develop, build, deploy, redeploy, and teardown frontend projects fast.
Stars: ✭ 126 (-85%)
Mutual labels:  autoprefixer, boilerplate, sass
Long Haul
A minimal, type-focused Jekyll theme.
Stars: ✭ 524 (-37.62%)
Mutual labels:  gulp, autoprefixer, sass
Sassy Starter
🎉 Sassy starter - HTML / SCSS (SMACSS)
Stars: ✭ 740 (-11.9%)
Mutual labels:  gulp, boilerplate, sass
Wordpressify
🎈 A build system designed to automate your WordPress development workflow.
Stars: ✭ 1,374 (+63.57%)
Mutual labels:  gulp, build-tool, boilerplate
Instapack
All-in-one TypeScript and Sass compiler for web applications! 📦 🚀
Stars: ✭ 131 (-84.4%)
Mutual labels:  build-tool, minify, sass
Glup
Some of the gulp tutorial -《gulp笔记》
Stars: ✭ 136 (-83.81%)
Mutual labels:  gulp, minify, sass
Bootstrap 4 Sass Gulp 4 Boilerplate
A Bootstrap 4.5.2 boilerplate with font-awesome, sass, gulp 4 tasks
Stars: ✭ 103 (-87.74%)
Mutual labels:  gulp, boilerplate, sass
Frontie Webpack
Front-end Boilerplate | Gulp 4 + Webpack 4 + Babel + ITCSS Architecture + BEM Methodology + Twig.js
Stars: ✭ 102 (-87.86%)
Mutual labels:  gulp, boilerplate, sass
Gulp Starter Kit
A simple Gulp 4 Starter Kit for modern web development.
Stars: ✭ 134 (-84.05%)
Mutual labels:  gulp, autoprefixer, sass
Bootstrap 4 Boilerplate
Bootstrap 4.3.1 boilerplate with Browsersync, Sass and Gulp.js
Stars: ✭ 155 (-81.55%)
Mutual labels:  gulp, boilerplate, sass
Neumorphism Ui Bootstrap
Neumorphism inspired UI Kit: web components, sections and pages in neumorphic style built with Bootstrap CSS Framework
Stars: ✭ 463 (-44.88%)
Mutual labels:  gulp, sass
Laravel Vue Boilerplate
🐘 A Laravel 6 SPA boilerplate with a users CRUD using Vue.js 2.6, GraphQL, Bootstrap 4, TypeScript, Sass, and Pug.
Stars: ✭ 472 (-43.81%)
Mutual labels:  boilerplate, sass
Magento2 Frontools
Set of front-end tools for Magento 2 based on Gulp.js
Stars: ✭ 416 (-50.48%)
Mutual labels:  gulp, sass
Gmdjs
Grid Material Design
Stars: ✭ 24 (-97.14%)
Mutual labels:  gulp, sass
Next Boilerplate
A well-structured production ready Next.js boilerplate with Typescript, Redux, Jest, Enzyme, Express.js, Sass, Css, EnvConfig, Fetch, Reverse Proxy, Bundle Analyzer and Built-in Project CLI. https://pankod.github.io/next-boilerplate/
Stars: ✭ 936 (+11.43%)
Mutual labels:  boilerplate, sass
Packem
📦⚡ A precompiled JavaScript module bundler
Stars: ✭ 586 (-30.24%)
Mutual labels:  build-tool, minify
React Webpack Typescript Starter
Minimal starter with hot module replacement (HMR) for rapid development.
Stars: ✭ 632 (-24.76%)
Mutual labels:  boilerplate, sass
Pixel Bootstrap Ui Kit
Pixel UI - Free and open source Bootstrap 5 UI Kit without jQuery
Stars: ✭ 406 (-51.67%)
Mutual labels:  gulp, sass

Gulp Boilerplate Build Status

A boilerplate for building web projects with Gulp. Uses Gulp 4.x.

IMPORTANT: This project is no longer maintained, and is offered as-is. It is strongly recommended that you instead use my Build Tool Boilerplate.

Features

  • Concatenate, minify, and lint JavaScript.
  • Compile, minify, autoprefix, and lint Sass.
  • Optimize SVGs.
  • Copy static files and folders into your dist directory.
  • Automatically add headers and project details to JS and CSS files.
  • Create polyfilled and non-polyfilled versions of JS files.
  • Watch for file changes, and automatically recompile build and reload webpages.

Gulp Boilerplate makes it easy to turn features on and off, so you can reuse it for all of your projects without having to delete or modify tasks.

Getting Started

Dependencies

Note: if you've previously installed Gulp globally, run npm rm --global gulp to remove it. Details here.

Make sure these are installed first.

Quick Start

  1. In bash/terminal/command line, cd into your project directory.
  2. Run npm install to install required files and dependencies.
  3. When it's done installing, run one of the task runners to get going:
    • gulp manually compiles files.
    • gulp watch automatically compiles files and applies changes using BrowserSync when you make changes to your source files.

Try it out. After installing, run gulp to compile some test files into the dist directory. Or, run gulp watch and make some changes to see them recompile automatically.

Documentation

Add your source files to the appropriate src subdirectories. Gulp will process and and compile them into dist.

  • JavaScript files in the src/js directory will be compiled to dist/js. Files in subdirectories under the js folder will be concatenated. For example, files in js/detects will compile into detects.js.
  • Files in the src/sass directory will be compiled to dist/css.
  • SVG files placed in the src/svg directory will be optimized with SVGO and compiled into dist/svg.
  • Files and folders placed in the copy directory will be copied as-is into the dist directory.

package.json

The package.json file holds all of the details about your project.

Some information is automatically pulled in from it and added to a header that's injected into the top of your JavaScript and CSS files.

{
	"name": "project-name",
	"version": "0.0.1",
	"description": "A description for your project.",
	"main": "./dist/your-main-js-file.js",
	"author": {
		"name": "YOUR NAME",
		"url": "http://link-to-your-website.com"
	},
	"license": "MIT",
	"repository": {
		"type": "git",
		"url": "http://link-to-your-git-repo.com"
	},
	"devDependencies": {}
}

Note: devDependencies are the dependencies Gulp uses. Don't change these or you'll break things. If any of the other fields are removed, make sure to remove reference to them in the Header (under var banner in gulpfile.js) or gulp watch won't run.

JavaScript

Put your JavaScript files in the src/js directory.

Files placed directly in the js folder will compile directly to dist/js as both minified and unminified files. Files placed in subdirectories under src/js will also be concatenated into a single file. For example, files in js/detects will compile into detects.js.

A note about polyfills: In subdirectories that contain files with the .polyfill.js suffix (for example, _matches.polyfill.js), two versions will be created: one with the polyfill files, and one without.

Sass

Put your Sass files in the src/sass directory.

Gulp generates minified and unminified CSS files. It also includes autoprefixer, which adds vendor prefixes for you.

SVGs

Place SVG files in the src/svg directory.

SVG files will be optimized with SVGO and compiled into dist/svg.

Copy Files

Files and folders placed in the src/copy directory will be copied as-is into dist.

This is a great place to put HTML files, images, and pre-compiled assets.

Options & Settings

Gulp Boilerplate makes it easy to customize for projects without having to delete or modify tasks.

Options and settings are located at the top of the gulpfile.js.

Settings

Set features under the settings variable to true to turn them on (default), and false to turn them off.

/**
 * Settings
 * Turn on/off build features
 */

var settings = {
	clean: true,
	scripts: true,
	polyfills: true,
	styles: true,
	svgs: true,
	copy: true,
	reload: true
};

Paths

Adjust the input and output paths for all of the Gulp tasks under the paths variable. Paths are relative to the root project folder.

/**
 * Paths to project folders
 */

var paths = {
	input: 'src/',
	output: 'dist/',
	scripts: {
		input: 'src/js/*',
		// polyfills: '!src/js/*.polyfill.js',
		polyfills: '.polyfill.js',
		output: 'dist/js/'
	},
	styles: {
		input: 'src/sass/**/*.{scss,sass}',
		output: 'dist/css/'
	},
	svgs: {
		input: 'src/svg/*.svg',
		output: 'dist/svg/'
	},
	copy: {
		input: 'src/copy/*',
		output: 'dist/'
	},
	reload: './dist/'
};

Header

Gulp auto-injects a header into all of your JavaScript and CSS files with details from your package.json file.

You can change what's included under the banner variable.

/**
 * Template for banner to add to file headers
 */

var banner = {
	full:
		'/*!\n' +
		' * <%= package.name %> v<%= package.version %>\n' +
		' * <%= package.description %>\n' +
		' * (c) ' + new Date().getFullYear() + ' <%= package.author.name %>\n' +
		' * <%= package.license %> License\n' +
		' * <%= package.repository.url %>\n' +
		' */\n\n',
	min:
		'/*!' +
		' <%= package.name %> v<%= package.version %>' +
		' | (c) ' + new Date().getFullYear() + ' <%= package.author.name %>' +
		' | <%= package.license %> License' +
		' | <%= package.repository.url %>' +
		' */\n'
};

License

The code is available under the MIT License.

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