assemble-ask
Advanced tools
+3
-2
@@ -16,3 +16,4 @@ /*! | ||
| function config(inst, ctx) { | ||
| ctx = utils.merge({}, inst.store.data, ctx); | ||
| var data = inst.store && inst.store.data; | ||
| ctx = utils.merge({}, data, ctx); | ||
| return utils.ask({ | ||
@@ -55,3 +56,3 @@ questions: inst.questions, | ||
| var ask = config(this, ctx); | ||
| return ask(name, ctx, cb); | ||
| return ask.once(name, ctx, cb); | ||
| }); | ||
@@ -58,0 +59,0 @@ |
+2
-2
| { | ||
| "name": "assemble-ask", | ||
| "description": "Assemble plugin for asking questions and storing answers.", | ||
| "version": "0.1.1", | ||
| "version": "0.1.2", | ||
| "homepage": "https://github.com/jonschlinkert/assemble-ask", | ||
@@ -24,3 +24,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
| "dependencies": { | ||
| "ask-once": "^0.4.3", | ||
| "ask-once": "^0.5.0", | ||
| "lazy-cache": "^0.2.3", | ||
@@ -27,0 +27,0 @@ "mixin-deep": "^1.1.3", |
+15
-1
@@ -54,2 +54,16 @@ # assemble-ask [](http://badge.fury.io/js/assemble-ask) | ||
| ## Helpers | ||
| Also adds an `ask` helper that can lookup stored questions and answers. | ||
| **Example** | ||
| The following will prompt the user once: | ||
| ```hbs | ||
| {{ask "What is your name"}} | ||
| ``` | ||
| If an answer is given by the user, it will be stored and automatically used until the user asks again on a new project or forces the question to be re-asked. | ||
| ## API | ||
@@ -90,2 +104,2 @@ | ||
| _This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 14, 2015._ | ||
| _This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 16, 2015._ |
6996
5.76%75
1.35%103
15.73%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
Updated