title | date | author | version | tags |
---|---|---|---|---|
webpack-playground-template |
Mizok |
0.9.1 |
A webpack boilerplate for playground exmaple showcase that uses ejs
as the template engine.
- Run
npm install
ornpm i
first to install all dependencies. - Run
npm run dev
to start the dev-server.
You have to put your examples entry ejs
files in ./src/examples/{YOUR_EXAMPLE_NAME}
, and you must name it index.ejs
, so the full path will be ./src/examples/{YOUR_EXAMPLE_NAME}/index.ejs
.
- You have to put your template
ejs
files in./src/template
. - In your
ejs
file which you want to insert your template:
<%- include(`{YOUR_TEMPLATE_PATH(RELATIVE)}`) %>
for more detail, please check links below:
first you have to create a folder under src/examples
for your new example.
then you will have to add these files into the new folder:
- an
index.ejs
- an
index.ts
or add ats
folder then add anindex.ts
inside it. (Optional) - an
main.scss
or add ascss
folder then add anmain.scss
inside it. (Optional)
Like this (in your ejs
file) :
<div><%= mode%></div>
Check if you are using alias
path , but not relative path, like below:
<img src="~@img/logo.png">