question-store
Advanced tools
Comparing version 0.10.0 to 0.11.0
13
index.js
@@ -65,2 +65,7 @@ 'use strict'; | ||
// load common-config | ||
utils.sync(this, 'common', function() { | ||
return utils.config; | ||
}); | ||
// persist project-specific answers | ||
@@ -90,5 +95,9 @@ utils.sync(this, 'store', function() { | ||
this.on('ask', function(val, key, question, answers) { | ||
if (!utils.isAnswer(val) && app.enabled('common')) { | ||
val = question.answer = app.common.get(key); | ||
debug('no answer found, using common-config: "%s"', val); | ||
} | ||
if (!utils.isAnswer(val) && app.enabled('global')) { | ||
question.answer = app.globals.get(key); | ||
debug('no answer found, using global: "%s"', val); | ||
debug('no answer found, using global-store: "%s"', val); | ||
} | ||
@@ -101,3 +110,3 @@ }); | ||
// persist to 'project' store if 'save' is not disabled | ||
if (!options.disabled('save')) { | ||
if (options.enabled('save')) { | ||
debug('saving answer in project store: %j', val); | ||
@@ -104,0 +113,0 @@ app.store.set(key, val); |
@@ -11,2 +11,3 @@ 'use strict'; | ||
require = utils; | ||
require('common-config', 'common'); | ||
require('data-store', 'Store'); | ||
@@ -13,0 +14,0 @@ require('is-answer'); |
{ | ||
"name": "question-store", | ||
"description": "Ask questions, persist the answers. Basic support for i18n and storing answers based on current working directory.", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"homepage": "https://github.com/jonschlinkert/question-store", | ||
@@ -26,2 +26,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"dependencies": { | ||
"common-config": "^0.1.0", | ||
"data-store": "^0.16.1", | ||
@@ -31,4 +32,4 @@ "debug": "^2.2.0", | ||
"lazy-cache": "^2.0.1", | ||
"project-name": "^0.2.5", | ||
"question-cache": "^0.5.0" | ||
"project-name": "^0.2.6", | ||
"question-cache": "^0.5.1" | ||
}, | ||
@@ -35,0 +36,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
11621
5
146
0
110
7
+ Addedcommon-config@^0.1.0
+ Addedansi-bgblack@0.1.1(transitive)
+ Addedansi-bgblue@0.1.1(transitive)
+ Addedansi-bgcyan@0.1.1(transitive)
+ Addedansi-bggreen@0.1.1(transitive)
+ Addedansi-bgmagenta@0.1.1(transitive)
+ Addedansi-bgred@0.1.1(transitive)
+ Addedansi-bgwhite@0.1.1(transitive)
+ Addedansi-bgyellow@0.1.1(transitive)
+ Addedansi-black@0.1.1(transitive)
+ Addedansi-blue@0.1.1(transitive)
+ Addedansi-bold@0.1.1(transitive)
+ Addedansi-colors@0.2.0(transitive)
+ Addedansi-cyan@0.1.1(transitive)
+ Addedansi-dim@0.1.1(transitive)
+ Addedansi-green@0.1.1(transitive)
+ Addedansi-grey@0.1.1(transitive)
+ Addedansi-hidden@0.1.1(transitive)
+ Addedansi-inverse@0.1.1(transitive)
+ Addedansi-italic@0.1.1(transitive)
+ Addedansi-magenta@0.1.1(transitive)
+ Addedansi-red@0.1.1(transitive)
+ Addedansi-reset@0.1.1(transitive)
+ Addedansi-strikethrough@0.1.1(transitive)
+ Addedansi-underline@0.1.1(transitive)
+ Addedansi-white@0.1.1(transitive)
+ Addedansi-yellow@0.1.1(transitive)
+ Addedarr-diff@2.0.0(transitive)
+ Addedasync@1.5.2(transitive)
+ Addedasync-done@0.4.01.3.2(transitive)
+ Addedasync-settle@0.2.1(transitive)
+ Addedbach@0.5.0(transitive)
+ Addedbraces@1.8.5(transitive)
+ Addedcamelcase@3.0.0(transitive)
+ Addedco@4.6.0(transitive)
+ Addedcommon-config@0.1.1(transitive)
+ Addedcomposer@0.13.0(transitive)
+ Addedend-of-stream@0.1.51.4.4(transitive)
+ Addederror-symbol@0.1.0(transitive)
+ Addedexpand-brackets@0.1.5(transitive)
+ Addedexpand-range@1.8.2(transitive)
+ Addedextglob@0.3.2(transitive)
+ Addedfilename-regex@2.0.1(transitive)
+ Addedfill-range@2.2.4(transitive)
+ Addedglob-base@0.3.0(transitive)
+ Addedglob-parent@2.0.0(transitive)
+ Addedinfo-symbol@0.1.0(transitive)
+ Addedis-date-object@1.0.5(transitive)
+ Addedis-dotfile@1.0.3(transitive)
+ Addedis-equal-shallow@0.1.3(transitive)
+ Addedis-extglob@1.0.0(transitive)
+ Addedis-generator@1.0.3(transitive)
+ Addedis-glob@2.0.1(transitive)
+ Addedis-number@4.0.0(transitive)
+ Addedis-posix-bracket@0.1.1(transitive)
+ Addedlodash.assign@4.2.0(transitive)
+ Addedlodash.filter@4.6.0(transitive)
+ Addedlodash.flatten@4.4.0(transitive)
+ Addedlodash.foreach@4.5.0(transitive)
+ Addedlodash.initial@4.1.1(transitive)
+ Addedlodash.last@3.0.0(transitive)
+ Addedlodash.map@4.6.0(transitive)
+ Addedlog-ok@0.1.1(transitive)
+ Addedlog-utils@0.2.1(transitive)
+ Addedmath-random@1.0.4(transitive)
+ Addedmicromatch@2.3.11(transitive)
+ Addednanoseconds@0.1.0(transitive)
+ Addednext-tick@0.2.2(transitive)
+ Addednormalize-path@2.1.1(transitive)
+ Addednow-and-later@0.0.6(transitive)
+ Addedobject.omit@2.0.1(transitive)
+ Addedobject.pick@1.3.0(transitive)
+ Addedomit-empty@0.3.6(transitive)
+ Addedonce@1.3.3(transitive)
+ Addedparse-glob@3.0.4(transitive)
+ Addedpreserve@0.2.0(transitive)
+ Addedquestion-cache@0.4.0(transitive)
+ Addedrandomatic@3.1.1(transitive)
+ Addedregex-cache@0.4.4(transitive)
+ Addedremove-trailing-separator@1.1.0(transitive)
+ Addedrepeat-element@1.1.4(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedstream-exhaust@1.0.2(transitive)
+ Addedsuccess-symbol@0.1.0(transitive)
+ Addedtableize-object@0.1.0(transitive)
+ Addedtext-table@0.2.0(transitive)
+ Addedtime-stamp@1.1.0(transitive)
+ Addeduse@1.1.2(transitive)
+ Addedwarning-symbol@0.1.0(transitive)
+ Addedyargs-parser@2.4.1(transitive)
Updatedproject-name@^0.2.6
Updatedquestion-cache@^0.5.1