Git Product home page Git Product logo

pug-sass-boilerplate-starter-kit's Introduction

Pug-Sass Boilerplate Starter Kit

Pug-Sass Boilerplate Starter Kit is a Front-end web kit and boilerplate for building web apps or small sites using Pug(Jade) and Sass

Inspiration

This project is based on a simple and fast workflow focused mainly on the front-end task. It gives a solid starting point for newcomers who wants a ready-to-deploy local environment setup. The sources used to build this project includes:

Features

  • Pug-Sass ready.
  • Easy to deploy your production files
  • Performance optimization: minify and concatenate JavaScript, CSS, HTML and images
  • Live browser reloading with BrowserSync
  • Includes:

Requirements

Optionals

Getting Started

After Node.js, npm, Gulp and Bower(optional) installation, you can create a new project based on pug-sass-boilerplate-starter-kit by doing the following:

Install From Source

First, clone the project:

$ git clone https://github.com/Errec/pug-sass-boilerplate-starter-kit.git <my-project-name>

Initialize npm on <my-project-name> directory

$ cd <my-project-name>
$ npm init

Install Gulp locally

$ sudo npm install gulp --save-dev

Finally, install Gulp required dependencies

$ sudo npm install gulp-uglify browser-sync gulp-plumber gulp-autoprefixer gulp-sass gulp-pug gulp-imagemin gulp-cache gulp-clean-css gulp-sourcemaps gulp-concat beeper gulp-util gulp-rename gulp-notify --save-dev

get start demo gif

Optionally, if you want to add external components and libraries, initialize Bower and install the dependencies to be used in your next project (e.g.: jQuery, Bootstrap, Modernizer).

$ bower init
$ bower install jquery --save
$ bower install bootstrap --save

Running Your Local Server With Gulp

After the installation of all requirements and its dependencies, your local web development environment is ready to run. Setup your initial files with gulp setup. This command is only necessary the first time the project is set or if the build folder is deleted.

$ gulp setup

Now run your local server using the watch task

$ gulp watch

This task will open the browser window usually with the URL http://localhost:3000/. Any saved changes made to the project files, will reload automatically the browser.

gulp task demo gif

Project Structure

The structure presented in this boilerplate is grouped primarily by folder content and file type. Please note that this structure is only meant to serve as a guide, it is by no means prescriptive.

.
├── build/                      # Store processed/minified files - your project's deployable output
├── img/                        # Main folder for image files
├── js/                         # Main folder for JS files
│   ├── vendor/                 # Store third part library files (e.g.: jquery, bootstrap)
│   └── main.js                 # Index JS code goes here
├── styles/                     # Main folder for cascade style files
│   ├── modules/                # Store third party modules and initializers (e.g.: normalize, reset)
│   ├── variables/              # Store sass variables files
│   └── main.scss               # Index Sass goes here
├── templates/                  # Main folder for pug template files
├── .bowerrc                    # Change bower library destination path from its default
├── gulpfile.js                 # Setup Gulp tasks
└── index.pug                   # Index pug markup goes here

The build/ Contents

.
├── build/
    ├── img/                    # Contains the compressed and optimized image files
    ├── css/                    # Contains the concatenated/minified .css files and .map files
    ├── js/                     # Contains the concatenated/minified/uglyfied .js files and .map files
    │   └── vendor/             # Store third party libraries
    └── index.html              # Minified html index file

The Gulp plugins

  • Autoprefixer : Write CSS rules without vendor prefixes.
  • beeper : Beeps when an error happens.
  • BrowserSync : Keep multiple browsers in sync after file save.
  • cache : Keeps an in-memory cache of files images so only changed images are compressed with Imagemin plugin.
  • clean-css : CSS optimizer and minifier.
  • concat : Concatenates .js files into bundle.js.
  • imagemin : Minify PNG, JPEG, GIF and SVG images.
  • notify : Send error messages to Mac Notification Center, Linux notifications or Windows >= 8.
  • plumber : Prevent pipe breaking caused by errors from gulp plugins.
  • Pug : Compile your Pug templates into HTML.
  • rename : Rename minified files adding .min suffix.
  • SASS : Compile your SASS or SCSS into CSS.
  • sourcemaps : Create CSS and JavaScript map files to debug the code within compressed files.
  • uglify : Minify JavaScript files.
  • gutil : Log the error message with red highlighting for easier reading.

pug-sass-boilerplate-starter-kit's People

Contributors

errec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pug-sass-boilerplate-starter-kit's Issues

package.json is not present

It would be easier to use the repo if you provided the package.json instead of installing all the dependencies one by one

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.