1.6.0 • Published 6 years ago
node-hag v1.6.0
HTML Asset Generator (HAG)
The generator processes instructions
to render
assets
based on templates
combined with data
.
Supports rendering of HTML to Images using webshot
, and creation of text based assets such as JSON, CSS, and HTML using Handlebar templates.
Key terms
- Instruction - a JSON block that specifies what to render
- Asset - a useful item to be generated, such as an image, HTML, text, or JSON file
- Template - a cookie-cutter layouts that can be fed with data
- Renderer - the method used to combine the template, with the data, and then save it out as an asset
- Data - JSON data that can be fed into templates to create an asset
Project structure
generator.js
- the entry point to run the generatorbuild
- the target directory for produced assetstemplates
- a folder of usable templatestemplates/template-name
- an individual templateinstructions
- a folder full of data to be rendered
Installation
npm install node-hag -g
Getting started
- Run
hag --help
to view up-to-date Help and Instructions - Run
hag init
to create an example project in the current working directory - Run
hag generate
to compiled the instructions and generate assets
If that all worked as expected, take a closer look at the instructions
folder, and the resulting build
folder to see the generated assets.
Guides
- Command line arguments
- Instructions, data, and templates
- Output formats; text, json, image
- Samples and use cases
Development
- Checkout the project, run
npm install
- Run
npm test
Changelog
See: CHANGELOG.md
1.6.0
6 years ago
1.5.0
6 years ago
1.4.1
7 years ago
1.4.0
7 years ago
1.3.1
7 years ago
1.3.0
8 years ago
1.2.1
8 years ago
1.2.0
8 years ago
1.1.8
8 years ago
1.1.7
8 years ago
1.1.6
8 years ago
1.1.5
8 years ago
1.1.4
8 years ago
1.1.3
8 years ago
1.1.2
8 years ago
1.1.1
8 years ago
1.1.0
8 years ago
1.0.9
8 years ago
1.0.8
8 years ago
1.0.7
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago