Spike html standards plugin pack for reshape
Note: This project is in early development, and versioning is a little different. Read this for more details.
npm install spike-html-standards -S
Note: This project is compatible with node v6+ only
This is nothing more than a light wrapper around a bundle of plugins. Options are filtered into their appropriate plugins internally. All are optional.
const reshape = require('reshape')
const htmlStandards = require('spike-html-standards')
reshape({
plugins: htmlStandards(/* options */)
})
By default, the html standard plugin pack includes:
- sugarml, provided as default parser
- reshape-expressions, default settings
- reshape-layouts, default settings
- reshape-include, default settings
- reshape-content with a
md
function that renders markdown using markdown-it - reshape-retext with the smartypants plugin
Any of these plugins can be customized by passing options described below.
Name | Description | Default |
---|---|---|
root | Root path used to resolve layouts and includes | |
filename | Name of the file being compiled, used for error traces and as the include/layout root if not otherwise provided | |
addDependencyTo | Object with addDependency method that will get file paths for tracked deps from includes/layouts |
|
webpack | Shortcut for webpack users to set the root and addDependencyTo options more easily. Pass webpack loader context. |
|
delimiters | Delimiters used for html-escaped expressions | ['{{', '}}'] |
unescapeDelimiters | Delimiters used for unescaped expressions | ['{{{', '}}}'] |
markdown | Options passed in to markdown-it constructor | { typographer: true, linkify: true } |
content | Options passed to the reshape-content plugin | { md: renderMarkdown } |
parser | custom html parser if desired. pass false to use the default html parser |
sugarml |
retext | Plugins to be passed to the reshape-retext plugin | [smartypants] (ref) |
locals | Added directly to the output object, used when compiling a reshape template to html | {} |
- Details on the license can be found here
- Details on running tests and contributing can be found here