GithubHelp home page GithubHelp logo

hszy00232 / webpack-multipage-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bbrewer97202/webpack-multipage-starter

0.0 2.0 0.0 400 KB

Bundle shared "core" Javascript and CSS for all pages, bundle Javascript and CSS unique to single page types separately.

JavaScript 75.97% CSS 6.70% HTML 17.33%

webpack-multipage-starter's Introduction

webpack multipage starter

Bundle shared "core" Javascript and CSS for all pages, bundle Javascript and CSS unique to single page types separately.

Goals

  • Component driven architecture
  • Enable use of common third-party libraries like Bootstrap, jQuery.
  • Use ES6

Installation

Install dependencies,

$ npm install 

Usage

Run grunt task to generate 'dist' directory and start development server and watch:

$ grunt

Open http://localhost:8000 in a browser.

Details

All source code lives in the "src" directory. Child directories in "entry" exist for each type of page. For example a site with three kinds of templates (a homepage, a catalog page, and a product detail page) would have three sub-directories here. As much code as possible lives within "components" sub-directories. Components used across multiple entry page types are shared as "core" JavaScript and CSS files. Code that is not component based or entry page template specific lives in the "utility" directory. Third party code goes in the "vendor" directory.

Notes

CSS code is generated from SASS. Use of a BEM style naming convention recommended since CSS bundle order cannot be controlled.

ES5-Shims included for IE8 or less support, added to entry page HTML files in IE conditional comments. These libs and references may be removed if IE8 support is not required. Even with shim some ES6 features will not work well (e.g. getters/setters), see https://github.com/es-shims/es5-shim

Run 'grunt production' for optimized build.

License

MIT License

webpack-multipage-starter's People

Contributors

bbrewer97202 avatar

Watchers

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