Name: helper-ask-include
Owner: Helpers
Description: Async template helper that prompts the user to choose the `include` or `includes` to render.
Created: 2016-07-27 18:15:03.0
Updated: 2017-02-20 07:33:45.0
Pushed: 2017-02-20 07:33:43.0
Homepage: null
Size: 9
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Async template helper that prompts the user to choose the
include
orincludes
to render.
Install with npm:
m install --save helper-ask-include
templates = require('templates');
questions = require('base-questions');
app = templates();
use(questions());
engine('md', require('engine-base'));
asyncHelper('askInclude', require('helper-ask-include'));
create('pages');
create('includes');
include('a.md', {content: 'this is AAA'});
include('b.md', {content: 'this is BBB'});
include('c.md', {content: 'this is CCC'});
page = app.page('index.md', {
ntent: 'Before\n<%= askInclude("includes") %>\nAfter'
render(page, function(err, res) {
(err) return console.log(err);
nsole.log(res.content);
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
m install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
m install && npm test
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. MIT
This file was generated by verb-generate-readme, v0.4.2, on February 20, 2017.