This is my setting for webpack boilerplate. You are able to make modules with html tags. It is very easy to use for begginers.
- Hot reloading on changes or save. (HTML/JS/SASS).
- Importing HTML files in HTML files with new tag
<require path="./path/to/your/html/file"></require>
. - Posibility to use packages inside
.js
files withrequire('package')
. - Minify code in build process.
- Import JSON files as objects to your
.js
. - And more... just check it out in packages.json to get more info about packeges i added to it. Same for webpack.config.js
Make new issue and i will look at it.
💾 1. git clone
- Standard :-)
⚙️ 2. npm install
- to install all packages.
🧰 3. npm start
- to start your http://localhost:3000
💚 4. npm build
- to build your product.
Create new page:
npm run add-page <your page name>
:
- it will create new directory inside
./src/pages/
with name of your defined page. - it will create inside your new directory files:
yourpagename.html
,yourpagename.js
,yourpagename.scss
- it will add
<script>
inside yourpagename.html with src to yourpagename.js - it will add
@import "../pages/yourpagename/yourpagename.scss";
to./src/styles/imports.scss
; - it will add
<require path="../pages/yourpagename/yourpagename.html"></require>
to./src/pages/homepage/homepage.html
npm run remove-page <your page name>
:
- it will remove directory with yourpagename inside
./src/pages/
- it will remove
@import "../pages/yourpagename/yourpagename.scss"
from./src/styles/imports.scss
- it will remove
<require path="../pages/yourpagename/yourpagename.html"></require>
from./src/pages/homepage/homepage.html