Boilerplate for a Static website using EJS and SASS
MIT License
Use EJS, SASS, and the latest JavaScript syntax to build fully-static production code with fast, live updates during development and the latest optimizations upon production. Global variables are used throughout the project to make it easily reconfigurable and DRY. Focus on building your frontend, not on building your tools.
Websites built with this boilerplate:
globals.js
: The variables in this file, such as SITE_TITLE and PP (public path), are used throughout the project. Change them in globals.js and they will be updated throughout your entire codebase where used. They are provided as global variables in your JS and EJS files.
<%= PP %>
. This will allow you to deploy your site from whichever directory you set PP tosrc/static
folder:
images/pineapple.jpg
file in src/static
, you would reference this in any of your *.ejs files (src/views
) like this:
<img src="<%= PP %>/images/pineapple.jpg">
src/js/index.js
. This will become app.js
vendor.js
bundle will be created from node_modules added to the "vendor" array in webpack.config.jssrc/css/_helpers.scss
globals.js
src/favicons
npm run dev
(to prepare files, start server, and watch files)
Development Features:
npm run build
Production Features:
Other Features:
_helpers.scss
print.scss
for common css fixes when printing a web pagenpm run prettier
; /prettier.config.jsIncluded Libraries: