GithubHelp home page GithubHelp logo

glivera-blog's Introduction

Welcome to glivera-webpack-boilerplate

Get started

  1. Install node.js

  2. If Windows

Install cross-env global

npm i cross-env -g

  1. Install npm packages

npm i or npm ci

  1. Let's code!
  • npm run dev - File watching + server
  • npm run dev-build - Build (development mode) + file watching
  • npm run build - Build (production mode)
  • npm run wp_build - Copies the files (css/js/fonts/static) to wp_theme directory

Template structure

build                        # Production build
helpers                      # All type samples and plugins
├── components               # Samples
├── components_vanilla       # Vanilla js helpers
settings                     # Webpack configs
src                          # Sources
├── fonts                    # Fonts template
│   ├── icons                # Iconfont template
├── images                   # Images template
│   ├── icons                # Icons template
│   |   ├── other_icons      # Icons unused in sprite
│   |   ├── sprite_icons     # Icons used in sprite
├── js                       # Scripts template
│   ├── components           # Functions for components
│   ├── dev_vendors          # Functions for develop, unused in production
│   ├── libs                 # Libriaries, plugins template
│   ├── utils                # Constants, helpers functions
├── pug                      # Layout templates
│   ├── blocks               # Layout of components
│   │   ├── universal        # Layout of universal components
│   ├── layout               # Page layout
│   ├── pages                # Page templates
│   ├── templates            # Base mixins, data arrays and variables for *.pug
│   │   ├── mixins           # Mixins used in project
├── scss                     # Styles template
│   ├── base_ui              # Styles for base elements
│   │   ├── forms            # Styles for form elements
│   ├── blocks               # Styles for all components
│   │   ├── universal        # Styles for universal components
│   ├── helpers              # Style extends, mixins and variables
│   │   ├── extends          # Extends for all components
│   │   │   ├── forms        # Extends for forms
│   │   │   ├── typography   # Extends for typography
│   ├── plugins              # Styles for plugins
│   ├── static               # Static files
.env                         # Environment configuration
.babelrc                     # Babel configuration
.editorconfig                # Configuring code editor settings
.gitignore                   # List of excluded files from Git
.eslintrc                    # Eslint rules
.sasslintrc                  # Sasslint rules
postcss.config.js            # Configuration of CSS post-processing
webpack.config.js            # Configuration for launching webpack tasks
package.json                 # List of modules and other information
readme.md                    # Documentation template

Rules:

File naming:

Type Naming Exuals to
Pug mixins (pug/templates) _m_your_component.pug name of component
JS components (js/components) nameOfYourFunction.js name of function

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.