Skip to content

Webpack boilerplate to generate static sites with the ability to include html files. Uses Sass for styling.

Notifications You must be signed in to change notification settings

jverneaut/webpack-static-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webpack Static Boilerplate

This boilerplate makes developing static html sites easy by allowing html imports.

Transform this:

<!-- views/index.html -->
<div>
  ${require('../partials/header.html')}

  <h1>Hello, World!</h1>
</div>

<!-- partials/header.html -->
<div>
  My site
</div>

into this:

<!-- views/index.html -->
<div>
  <div>
    My site
  </div>

  <h1>Hello, World!</h1>
</div>

Inspired by this blog post from extri.co.

Install

$ git clone https://github.com/jverneaut/webpack-static-boilerplate
$ npm install

Run

$ # Starts a development server on port 4000 with auto relaod
$ npm run watch

To build for production use

$ npm run build

Usage

Use ${require(./myFile.html)} to include external html files.

About

Webpack boilerplate to generate static sites with the ability to include html files. Uses Sass for styling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published