npm install maw
Make a static HTML page with some CSS, JS, and assets. Contains just the tools you need to write modern code and avoid repeating yourself. A gulpfile and webpack config in a box.
maw dev in the root of the project watches the
/src directory, and puts the output in
/build whenever files change.
maw build builds the site and puts the output in
You probably want to
npm install --save-dev maw and then add the above commands to a
package.json, like in this site.
All of these are nested inside
/src in the root of your project.
This is for static files, which are copied directly into the output. That includes images, fonts, and pre-bundled libraries you want to use.
index.less is compiled into
/less directory is watched for LESS imports, so basically put everything except
index.less in there.
index.html is compiled into
index.html and any handlebars code is evaluated against the files in
/templates. The name of the template is the filename without the extension, for example
nav.html can be included with
You can nest multiple
index.html files, for example
/about/index.html, to give your website multiple pages.
data.js should export any data you want to use in your handlebars templates, like so:
moduleexports =hello: 'world';
And then you can use it with: