https://github.com/doughtnerd/pug-stringifier
Converts a Pug template into an HTML string using ES6 Promises
https://github.com/doughtnerd/pug-stringifier
Last synced: 10 months ago
JSON representation
Converts a Pug template into an HTML string using ES6 Promises
- Host: GitHub
- URL: https://github.com/doughtnerd/pug-stringifier
- Owner: doughtnerd
- License: mit
- Created: 2017-07-28T21:28:18.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-28T21:41:14.000Z (almost 9 years ago)
- Last Synced: 2025-08-23T19:25:56.363Z (10 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/doughtnerd/pug-stringifier)
[](https://coveralls.io/github/doughtnerd/pug-stringifier?branch=master)
Pug Stringifier
=========
A small library that converts a Pug template into an HTML string using ES6 promises.
## Installation
`npm install @doughtnerd/pug-stringifier`
## Usage
var stringifier = require('@doughtnerd/pug-stringifier');
stringifier.stringify('absolute/path/to/template', {exampleContext: ['a', 'b', 'c']}).then((html) =>{
// Do whatever with the html string that was compiled from the template.
}).catch((err) => {
// Do whatever with the error.
});
## Tests
`npm test` or
`npm run cover`
## Contributing
In lieu of a formal style guide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Lint and test your code.