Giter VIP home page Giter VIP logo

fnnzzz-gulp-config's Introduction

Gulp config for static projects

My personal gulp config for a quick start of development.

Under the hood:

  • Livereload (browser-sync)
  • SASS to CSS (with mapssource)
  • Minify and concat JS
  • JSHint for JS
  • Bower
  • Compress images (gif, png, jpg, svg)

all source files, with which you'll be working in a folder 'assets/src'

all outputed files will be stored in 'dist' folder*

Project structure

  • assets/dev/images - for images (gif, png, jpg, svg)
  • assets/dev/js - for custom scripts (not libs like jquery and etc), these scripts will be minified and checked by JSHint.
  • assets/dev/js.concat - all scripts, that need be combined into one js-file. In output it will file 'combined.js' in 'assets/dist/js' dir.
  • assets/dev/libs - all libs (example: jquery, owlslider, hmtl-shiv). In in this folder there Bower, with which you can download libs. Output โ€” 'assets/dist/libs'
  • assets/dev/sass - for SASS-files.

How it work?

  1. Pull this repo.
  2. Install gulp globally (npm i gulp -g).
  3. Make "npm install" (all packages will be installed from "package.json" list)
  4. Then run "gulp" command. All outputed files will be stored in "dist" dir.

ENJOY!


How enable livereload?

  • Open gulpfile.js
  • End edit browserSync.init({ proxy: "localhost" }); where write needed url.
  • Then open this URL in browser with port written into the console (port 300x), for example: http://localhost:3005/
  • That's all. Now livereload watchin on all changes in 'src' folder and refresh page if is needed! Enjoy!

For production: 'gulp prod' (without watches).

For cleaning dist folder: gulp clean (useful to do from time to time).

Dirs dist and node_modules into .gitignore, so the project should be to rebuild on different machines

mac was here

fnnzzz-gulp-config's People

Contributors

fnnzzz avatar mac2000 avatar

Stargazers

Anastasia avatar

Watchers

 avatar James Cloos avatar  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.