Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 737 Bytes

.verb.md

File metadata and controls

38 lines (28 loc) · 737 Bytes

Heads up!

This plugin modifies the app.cache.data object with "expanded" values. For example, the following author property from package.json:

{
  author: 'Jon Schlinkert (https://github.com/jonschlinkert)'
}

Is expanded to:

{
  author: {
    name: 'Jon Schlinkert',
    url: 'https://github.com/jonschlinkert'
  }
}

"original" data

Before data is modified, it's cloned and set on the app.cache.originalData object. You can reset the data object to this value by doing something like the following:

app.cache.data = app.cache.originalData;

Usage

Use as a plugin inside your [generate][] generator:

module.exports = function(app) {
  app.use(require('generate-data'));
};