For examples take a look at examples
in this repository. The gh-page for this repository is built using SPB
and you can have a look at the setup under examples/spb-page.
You can currently compile typescript
, postcss
, scss
, js
, pug
and twig
files uing SPB
. all other files given to the builder will simply be copied to the output directory.
twig
and pug
The SPB
adds a context object (SPB
) to all .twig
and .pug
files which contains all stylesheets
, scripts
and html
files. This allowes to dynamically add all files to the html page.
pug
:
html
head
...
each stylesheet in spb.stylesheets
link(rel="text/stlesheet", href=stylesheet)
body
block content
each script in spb.scripts
script(type="text/javascript", src=script)
twig
: ...
....
{% for stylesheet in spb.stylesheets %}
{% endfor %}
....
...
{% for script in spb.scripts %}
{% endfor %}
...
Created by Simon Rothert