Gulp starter that can create a static webpage where each sub page can contain React components. A typical use-case might be a utility site where each sub page contains a small independent React application.
The starter project consists of:
- Pure html front page with links to each react page.
- Two pages that contains a React component.
- A counter component (click on number to increment)
- A component simply outputting a value from data.json file.
- clone repo
npm install
To start site locally on your machine:
gulp watch
The project is set up to give you a lot of customization at each page of the site.
- Create a new folder in app. Folder name can be anything.
- Add a
data.json
file. Used by Nunjucks template engine. - Add custom style by add a
style.scss
file - Create a html template file in folder. Must extend layout.nunjucks. Place content in body block.
- Create an
entry.js
file in folder. Gulp will use this file to bundle scripts.