Coder Social home page Coder Social logo

maksabuzyarov / gulp-webpack-handlebars Goto Github PK

View Code? Open in Web Editor NEW
25.0 2.0 10.0 148 KB

Gulp frontend builder with Webpack and Handlebars

Home Page: https://maksabuzyarov.github.io/gulp-webpack-handlebars/

License: MIT License

JavaScript 71.53% HTML 14.80% SCSS 0.39% Handlebars 13.27%
boilerplate frontend-development frontend-boilerplate bootstrap4 webpack gulp gulp4 babel browsersync sass

gulp-webpack-handlebars's Introduction

Front-end Boilerplate

contributions welcome license version

gulp-webpack-handlebars is a flexible template for web development. It includes many tools for creating responsive, high-performance and lightweight pages.

๐Ÿš€ Gulp 4 + Webpack 5 + Handlebars + Babel + BrowserSync ๐Ÿ”ฅ

Documentation

Getting Started

Install

  1. Install NodeJS and npm
  2. Clone this repository
  3. Run npm install
git clone https://github.com/maksabuzyarov/gulp-webpack-handlebars.git
cd gulp-webpack-handlebars
npm install

Use tasks

Task Name Description Environment
๐Ÿšง npm run dev or gulp Compile dev build, start the server and watch for changes Development
๐Ÿญ npm run build or gulp build --production Compile production build Production

How to use SVG sprite?

Add images
  1. optional Change color values (fill or stroke) in your SVG file to currentColor to support dynamic color changes.
  2. Put SVG file in src/img/svg-sprite directory.
  3. The code from your SVG file will be included in one svg-sprite and placed in dist/img/svg-sprite/sprite.svg
SVG tag
<svg viewBox="x0 y0 x1 y1">
  <use href="assets/img/svg-sprite/sprite.svg#YOUR_SVG_FILE_NAME"></use>
</svg>

You can get viewBox value from your SVG file or using devTools on the page after including sprite.svg

IMG tag
<img src="assets/img/svg-sprite/sprite.svg#YOUR_SVG_FILE_NAME" alt="">

In this case, the image does not respond to color changes.

โฌ† back to menu

Features

Type List
Task Runner Gulp
CSS SASS / SCSS, CleanCSS, Autoprefixer
JS Webpack, Babel
JS Examples FileInclude, Uglify
HTML Templates Handlebars.js, handlebars-layouts
Images ImageMin
Live Reload BrowserSync
Debug Sourcemaps, Plumber
More Favicons, SVG Sprites, Notifier, Changed
Included JS Jquery, Bootstrap 4, CurrentDevice

โฌ† back to menu

File structure

|-- dist
|-- tasks
|-- src
|   |-- fonts
|   |-- img
|   |   |-- favicon
|   |   |   |-- logo.png
|   |   |-- content (optional)
|   |   |-- main (optional)
|   |   |-- svg-sprite
|   |-- js
|   |   |-- components
|   |   |-- other
|   |   |-- app.js
|   |   |-- main.js
|   |-- styles
|   |   |-- components
|   |   |-- main.scss
|   |   |-- _app.scss
|   |   |-- _variables.scss
|   |-- views
|   |   |-- data
|   |   |-- helpers
|   |   |-- partials
|   |   |-- templates
|   |   |   |-- pages
|   |   |   |-- index.html
|-- .babelrc.js
|-- .browserslistrc
|-- .gitignore
|-- gulpfile.babel.js
|-- package.json
|-- webpack.config.js
  • dist - folder with the finished results of assembly. In dev mode, is the root of the server.

  • tasks - directory with gulp tasks.

  • .babelrc.js - babel static configuration.

  • gulpfile.babel.js - config and main tasks.

  • src - source files

    • fonts - fonts files in directories named by font name. For example fonts/Ubuntu/Regular.{woff, woff2, ttf}

    • img - all images for optimization:

      • content - optional directory (Implied as: dynamic images for pages, may be removed after placing the layout on the CMS)

      • main - optional directory (Implied as: static template images (logo, background and etc.))

      • favicon - generating favicons from one image

      • svg-sprite - optimizes them and bakes them into SVG sprites

    • views

      • helpers - Handlebars.js helpers

      • partials - Handlebars.js templates

      • template - site pages

        • index.html - entry point

        • pages - all pages

โฌ† back to menu

Copyright and license

Copyright 2019 Maksim Abuzyarov under the MIT license.

gulp-webpack-handlebars's People

Contributors

maksabuzyarov 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

Watchers

 avatar  avatar

gulp-webpack-handlebars's Issues

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.