Skip to content

A starter kit for webpack with pug, sass and meta-marked.

License

Notifications You must be signed in to change notification settings

BFDqt/webpack-starter-kit

 
 

Repository files navigation

Webpack-Starter-Kit

This is a starter kit for webpack with pug, sass and meta-marked. I made my personal website using this starter kit. Also you can find source code for my personal website here in Github.

System Preparation

To use this project, you will need NodeJS installed on your machine.

Local Installation

Inside the directory, run

$ npm install

You may encounter a warning like this:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

Just run npm audit fix to fix them.

Usage

1. Development mode

This will start the environment with file watching, browser synchronisation, auto-rebuild, js compilation, sass compilation, css injection, etc.

$ npm run start

2. Production mode

This will build your website in your ./dist folder. You may change webpack configuration to get your ideal file structure.

$ npm run build

Caution

In ./src/artilces.pug, changing

style='background-image:url(' + require('../images/articles/' +`${image}` + '.jpg') + ')'

may result in webpack being unable to recognize image links in markdown files. Because of the same problem, markdown files can only embed jpg files.

For some other mysterious reasons, changing Pug include file or MD file may not refresh the browser.

Sorry for the inconvenience!

About

A starter kit for webpack with pug, sass and meta-marked.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 80.4%
  • HTML 15.7%
  • CSS 3.9%