Git Product home page Git Product logo

gulp-boilerplate's Introduction

Build Status

Gulp boilerplate

a boilerplate for your gulp files!

  • Uses gulp version 4 ๐Ÿ˜Ž
  • Markup compilation
  • Stylesheet compilation
  • Script compilation
  • Source linting
  • Static server with automatic live reload/style injection

The aim is to get you up and running with something in gulp quickly!

Currently the boilerplate makes use of pug, stylus and es6/babel via rollup. But these technologies could easily be swapped out/removed based on your requirements.

The general presumption is that most projects require some form of markup, style and script compilation in addition to watching. This bundled in with some local static server capability if required.

The idea is that you will fork your own version and adapt it to fit in with the tech stack you are using and the tasks you need.

There are many alterations you could make.

For example;

  • You don't use pug, you remove the need for pug by adjusting your markup tasks to simply export markup to a desired destination post linting.
  • You need browserify so you adjust your compilation task to make use of browserify bundling.
  • You don't use stylus and you prefer SASS so you swap out the preprocessor package being used.

Usage

As a prerequisite it's assumed you have npm/yarn installed and the gulp-cli.

  1. Clone the repo

     git clone https://github.com/jh3y/gulp-boilerplate.git
    
  2. Install dependencies

     npm install / yarn
    
  3. Start gulp

     gulp
    
  4. Start hacking away with super fast livereload goodness.

Structure

You could have a gulpfile with all your tasks in one file. But, if your task list grows and it starts becoming a case of having to hunt through the file to refactor/make changes, it might be easier to split up your file and refactor your tasks into separate modules.

Tasks live under the build-tasks folder in relevant modules. For example, script related functions live within scripts.js. Each module exports aptly named functions such as compile, lint and watch. These are invoked from the gulpfile.

Tasks

You can see all available tasks with gulp -T. This will print out a list of available tasks and their respective metadata ๐Ÿ˜Ž

License

MIT


Any problems or questions, feel free to post an issue or tweet me, @_jh3y!

@jh3y 2018 ๐Ÿ˜„

gulp-boilerplate's People

Contributors

jh3y avatar makskokhtenko avatar mithun-daa avatar rzvnb avatar

Watchers

 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.