yeoman-generator 5.5.0 → 5.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +9 -3
- package/lib/util/storage.js +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1386,12 +1386,18 @@ this.composeWith({
|
|
|
1386
1386
|
* Return a storage instance.
|
|
1387
1387
|
* @param {String} storePath The path of the json file
|
|
1388
1388
|
* @param {String} [path] The name in which is stored inside the json
|
|
1389
|
-
* @param {
|
|
1389
|
+
* @param {boolean|Object} [options] Treat path as an lodash path
|
|
1390
1390
|
* @return {Storage} json storage
|
|
1391
1391
|
*/
|
|
1392
|
-
createStorage(storePath, path,
|
|
1392
|
+
createStorage(storePath, path, options) {
|
|
1393
|
+
if (typeof path === 'object') {
|
|
1394
|
+
options = path;
|
|
1395
|
+
} else if (typeof options === 'boolean') {
|
|
1396
|
+
options = {lodashPath: options};
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1393
1399
|
storePath = this.destinationPath(storePath);
|
|
1394
|
-
return new Storage(path, this.fs, storePath,
|
|
1400
|
+
return new Storage(path, this.fs, storePath, options);
|
|
1395
1401
|
}
|
|
1396
1402
|
|
|
1397
1403
|
/**
|
package/lib/util/storage.js
CHANGED