{"_id":"generify","_rev":"1927383","name":"generify","description":"A reusable project generator","dist-tags":{"latest":"4.2.0"},"maintainers":[{"name":"matteo.collina","email":""}],"time":{"modified":"2021-12-09T13:52:20.000Z","created":"2014-10-17T07:58:38.727Z","4.2.0":"2021-01-07T18:29:49.809Z","4.1.0":"2020-03-25T08:42:14.361Z","4.0.0":"2019-12-23T11:14:43.795Z","3.0.3":"2019-02-20T22:46:06.215Z","3.0.2":"2018-10-16T17:08:17.799Z","3.0.1":"2018-07-12T17:41:28.916Z","3.0.0":"2018-07-11T10:38:12.336Z","2.1.0":"2018-03-10T15:07:42.064Z","2.0.0":"2018-03-04T10:51:36.500Z","1.1.0":"2014-11-24T12:00:30.841Z","1.0.0":"2014-10-17T07:58:38.727Z"},"users":{"hville":true},"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"repository":{"type":"git","url":"git+https://github.com/mcollina/generify.git"},"versions":{"4.2.0":{"name":"generify","version":"4.2.0","description":"A reusable project generator","main":"generify.js","scripts":{"test":"standard | snazzy && tap --no-esm --no-ts --no-jsx test/*.js"},"bin":{"generify":"generify.js"},"repository":{"type":"git","url":"git+https://github.com/mcollina/generify.git"},"keywords":["project","generator","module"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","bugs":{"url":"https://github.com/mcollina/generify/issues"},"homepage":"https://github.com/mcollina/generify","devDependencies":{"pre-commit":"^1.2.2","rimraf":"^3.0.0","snazzy":"^8.0.0","standard":"^16.0.0","tap":"^14.0.0"},"dependencies":{"isbinaryfile":"^4.0.2","pump":"^3.0.0","split2":"^3.0.0","walker":"^1.0.6"},"gitHead":"2287238739e9c374c43ed59fd64f4a2f6016cdb2","_id":"generify@4.2.0","_nodeVersion":"12.20.0","_npmVersion":"6.14.10","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"dist":{"shasum":"19416c3e956a5ec3c6f205ddeaf261e1f258a97b","size":11045,"noattachment":false,"key":"/generify/-/generify-4.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/generify/download/generify-4.2.0.tgz"},"directories":{},"maintainers":[{"name":"matteo.collina","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/generify_4.2.0_1610044189643_0.8320577901420618"},"_hasShrinkwrap":false,"publish_time":1610044189809,"_cnpm_publish_time":1610044189809},"4.1.0":{"name":"generify","version":"4.1.0","description":"A reusable project generator","main":"generify.js","scripts":{"test":"standard | snazzy && tap --no-esm --no-ts --no-jsx test/*.js"},"bin":{"generify":"generify.js"},"repository":{"type":"git","url":"git+https://github.com/mcollina/generify.git"},"keywords":["project","generator","module"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","bugs":{"url":"https://github.com/mcollina/generify/issues"},"homepage":"https://github.com/mcollina/generify","devDependencies":{"pre-commit":"^1.2.2","rimraf":"^3.0.0","snazzy":"^8.0.0","standard":"^14.3.3","tap":"^14.0.0"},"dependencies":{"isbinaryfile":"^4.0.2","mkdirp":"^0.5.0","pump":"^3.0.0","split2":"^3.0.0","walker":"^1.0.6"},"gitHead":"a6c8e03d9aea47331e7e248e7e155fa44ef0c1e9","_id":"generify@4.1.0","_nodeVersion":"12.16.1","_npmVersion":"6.14.3","dist":{"shasum":"4a1986114696774d01e55eec9e91bfb3f45d63f0","size":10507,"noattachment":false,"key":"/generify/-/generify-4.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/generify/download/generify-4.1.0.tgz"},"maintainers":[{"name":"matteo.collina","email":""}],"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/generify_4.1.0_1585125734269_0.6089190530960544"},"_hasShrinkwrap":false,"publish_time":1585125734361,"_cnpm_publish_time":1585125734361},"4.0.0":{"name":"generify","version":"4.0.0","description":"A reusable project generator","main":"generify.js","scripts":{"test":"standard | snazzy && tap --no-esm --no-ts --no-jsx test/*.js"},"bin":{"generify":"generify.js"},"repository":{"type":"git","url":"git+https://github.com/mcollina/generify.git"},"keywords":["project","generator","module"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","bugs":{"url":"https://github.com/mcollina/generify/issues"},"homepage":"https://github.com/mcollina/generify","devDependencies":{"pre-commit":"^1.2.2","rimraf":"^3.0.0","snazzy":"^8.0.0","standard":"^14.0.0","tap":"^14.0.0"},"dependencies":{"isbinaryfile":"^4.0.2","mkdirp":"^0.5.0","pump":"^3.0.0","split2":"^3.0.0","walker":"^1.0.6"},"gitHead":"677ae009b685e76e8a8e82aef745490a7bbe5b2f","_id":"generify@4.0.0","_nodeVersion":"12.13.0","_npmVersion":"6.13.4","dist":{"shasum":"45cc730624c3ce113e0427d24ab9c08a633e65ba","size":10122,"noattachment":false,"key":"/generify/-/generify-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/generify/download/generify-4.0.0.tgz"},"maintainers":[{"name":"matteo.collina","email":""}],"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/generify_4.0.0_1577099683567_0.8485504750976396"},"_hasShrinkwrap":false,"publish_time":1577099683795,"_cnpm_publish_time":1577099683795},"3.0.3":{"name":"generify","version":"3.0.3","description":"A reusable project generator","main":"generify.js","scripts":{"test":"standard | snazzy && tap test/*.js"},"bin":{"generify":"./generify.js"},"repository":{"type":"git","url":"git+https://github.com/mcollina/generify.git"},"keywords":["project","generator","module"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","bugs":{"url":"https://github.com/mcollina/generify/issues"},"homepage":"https://github.com/mcollina/generify","devDependencies":{"osenv":"^0.1.0","pre-commit":"^1.2.2","rimraf":"^2.6.3","snazzy":"^8.0.0","standard":"^12.0.1","tap":"^12.5.3"},"dependencies":{"isbinaryfile":"^3.0.2","mkdirp":"^0.5.0","pump":"^3.0.0","split2":"^2.0.0","walker":"^1.0.6"},"gitHead":"4bb0fb0f13b72c2ae78eac6c5757b8202250088b","_id":"generify@3.0.3","_nodeVersion":"10.15.1","_npmVersion":"6.7.0","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"dist":{"shasum":"ee73d03ced17641a82fb5fce81689883619c4891","size":9401,"noattachment":false,"key":"/generify/-/generify-3.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/generify/download/generify-3.0.3.tgz"},"maintainers":[{"name":"matteo.collina","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/generify_3.0.3_1550702766015_0.12813582898940656"},"_hasShrinkwrap":false,"publish_time":1550702766215,"_cnpm_publish_time":1550702766215},"3.0.2":{"name":"generify","version":"3.0.2","description":"A reusable project generator","main":"generify.js","scripts":{"test":"standard | snazzy && tap test/*.js"},"bin":{"generify":"./generify.js"},"repository":{"type":"git","url":"git+https://github.com/mcollina/generify.git"},"keywords":["project","generator","module"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","bugs":{"url":"https://github.com/mcollina/generify/issues"},"homepage":"https://github.com/mcollina/generify","devDependencies":{"osenv":"^0.1.0","pre-commit":"^1.2.2","rimraf":"^2.2.8","snazzy":"^7.1.1","standard":"^11.0.0","tap":"^12.0.0"},"dependencies":{"mkdirp":"^0.5.0","pump":"^3.0.0","split2":"^2.0.0","walker":"^1.0.6"},"gitHead":"89869c663b1e33581d16612622cd6254eec17607","_id":"generify@3.0.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"dist":{"shasum":"42fdeabd4a0f2586f79b9054bc5943b62c1e91c7","size":4100,"noattachment":false,"key":"/generify/-/generify-3.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/generify/download/generify-3.0.2.tgz"},"maintainers":[{"name":"matteo.collina","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/generify_3.0.2_1539709697657_0.2880950309204455"},"_hasShrinkwrap":false,"publish_time":1539709697799,"_cnpm_publish_time":1539709697799},"3.0.1":{"name":"generify","version":"3.0.1","description":"A reusable project generator","main":"generify.js","scripts":{"test":"standard | snazzy && tap test/*.js"},"bin":{"generify":"./generify.js"},"repository":{"type":"git","url":"git+https://github.com/mcollina/generify.git"},"keywords":["project","generator","module"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","bugs":{"url":"https://github.com/mcollina/generify/issues"},"homepage":"https://github.com/mcollina/generify","devDependencies":{"osenv":"^0.1.0","pre-commit":"^1.2.2","rimraf":"^2.2.8","snazzy":"^7.1.1","standard":"^11.0.0","tap":"^12.0.0"},"dependencies":{"mkdirp":"^0.5.0","pump":"^3.0.0","split2":"^2.0.0","walker":"^1.0.6"},"gitHead":"6540af923d2a029e481cdea724afd1d9d8dc60a6","_id":"generify@3.0.1","_npmVersion":"6.1.0","_nodeVersion":"8.11.3","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"dist":{"shasum":"39b480099b0a6f22200e05d05df3fc1a0daf977e","size":4060,"noattachment":false,"key":"/generify/-/generify-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/generify/download/generify-3.0.1.tgz"},"maintainers":[{"name":"matteo.collina","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/generify_3.0.1_1531417288769_0.7526186894750859"},"_hasShrinkwrap":false,"publish_time":1531417288916,"_cnpm_publish_time":1531417288916},"3.0.0":{"name":"generify","version":"3.0.0","description":"A reusable project generator","main":"generify.js","scripts":{"test":"standard | snazzy && tap test/*.js"},"bin":{"generify":"./generify.js"},"repository":{"type":"git","url":"git+https://github.com/mcollina/generify.git"},"keywords":["project","generator","module"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","bugs":{"url":"https://github.com/mcollina/generify/issues"},"homepage":"https://github.com/mcollina/generify","devDependencies":{"osenv":"^0.1.0","pre-commit":"^1.2.2","rimraf":"^2.2.8","snazzy":"^7.1.1","standard":"^11.0.0","tap":"^12.0.0"},"dependencies":{"mkdirp":"^0.5.0","pump":"^3.0.0","split2":"^2.0.0","walker":"^1.0.6"},"gitHead":"6ac12247e249ff48045b177b72e088fa7159168f","_id":"generify@3.0.0","_npmVersion":"6.1.0","_nodeVersion":"8.11.3","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"dist":{"shasum":"efa8023c06663fda872e615a12a41a71049ce9b5","size":4038,"noattachment":false,"key":"/generify/-/generify-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/generify/download/generify-3.0.0.tgz"},"maintainers":[{"name":"matteo.collina","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/generify_3.0.0_1531305492259_0.13049996490583338"},"_hasShrinkwrap":false,"publish_time":1531305492336,"_cnpm_publish_time":1531305492336},"2.1.0":{"name":"generify","version":"2.1.0","description":"A reusable project generator","main":"generify.js","scripts":{"test":"standard | snazzy && tap test/*.js"},"bin":{"generify":"./generify.js"},"repository":{"type":"git","url":"git+https://github.com/mcollina/generify.git"},"keywords":["project","generator","module"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","bugs":{"url":"https://github.com/mcollina/generify/issues"},"homepage":"https://github.com/mcollina/generify","devDependencies":{"osenv":"^0.1.0","pre-commit":"^1.2.2","rimraf":"^2.2.8","snazzy":"^7.1.1","standard":"^11.0.0","tap":"^11.1.1"},"dependencies":{"mkdirp":"^0.5.0","pump":"^3.0.0","split2":"^0.2.1","walker":"^1.0.6"},"gitHead":"f9f0941bcddd3cc2300119f8264a0e9fb60ac50c","_id":"generify@2.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"dist":{"shasum":"a532c27716810016284f6add18c1faf1f373175e","size":3790,"noattachment":false,"key":"/generify/-/generify-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/generify/download/generify-2.1.0.tgz"},"maintainers":[{"name":"matteo.collina","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/generify_2.1.0_1520694461984_0.6706798226912234"},"_hasShrinkwrap":false,"publish_time":1520694462064,"_cnpm_publish_time":1520694462064},"2.0.0":{"name":"generify","version":"2.0.0","description":"A reusable project generator","main":"generify.js","scripts":{"test":"standard | snazzy && tap test/*.js"},"bin":{"generify":"./generify.js"},"repository":{"type":"git","url":"git+https://github.com/mcollina/generify.git"},"keywords":["project","generator","module"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","bugs":{"url":"https://github.com/mcollina/generify/issues"},"homepage":"https://github.com/mcollina/generify","devDependencies":{"osenv":"^0.1.0","pre-commit":"^1.2.2","rimraf":"^2.2.8","snazzy":"^7.1.1","standard":"^11.0.0","tap":"^11.1.1"},"dependencies":{"mkdirp":"^0.5.0","pump":"^3.0.0","split2":"^0.2.1","walker":"^1.0.6"},"gitHead":"2b269b9c0d0f55a5921b8f6cc6b34de032f664ab","_id":"generify@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"dist":{"shasum":"59a3b42eeaf23427aa6669e0c233e0a52476d7eb","size":3592,"noattachment":false,"key":"/generify/-/generify-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/generify/download/generify-2.0.0.tgz"},"maintainers":[{"name":"matteo.collina","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/generify_2.0.0_1520160696456_0.1412761364193944"},"_hasShrinkwrap":false,"publish_time":1520160696500,"_cnpm_publish_time":1520160696500},"1.1.0":{"name":"generify","version":"1.1.0","description":"A reusable project generator","main":"generify.js","scripts":{"test":"tape test.js | faucet"},"bin":{"generify":"./generify.js"},"repository":{"type":"git","url":"https://github.com/mcollina/generify.git"},"keywords":["project","generator","module"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","bugs":{"url":"https://github.com/mcollina/generify/issues"},"homepage":"https://github.com/mcollina/generify","devDependencies":{"faucet":"0.0.1","osenv":"^0.1.0","rimraf":"^2.2.8","tape":"^3.0.0"},"dependencies":{"mkdirp":"^0.5.0","split2":"^0.2.1","walker":"^1.0.6"},"gitHead":"8f814ec45139a1461a7adf82ef82f60f9af17e75","_id":"generify@1.1.0","_shasum":"831246448a8f831c3385012ce387b03c1f8b63c4","_from":".","_npmVersion":"2.1.9","_nodeVersion":"0.10.33","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"maintainers":[{"name":"matteo.collina","email":""}],"dist":{"shasum":"831246448a8f831c3385012ce387b03c1f8b63c4","size":3746,"noattachment":false,"key":"/generify/-/generify-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/generify/download/generify-1.1.0.tgz"},"directories":{},"publish_time":1416830430841,"_cnpm_publish_time":1416830430841,"_hasShrinkwrap":false},"1.0.0":{"name":"generify","version":"1.0.0","description":"A reusable project generator","main":"generify.js","scripts":{"test":"tape test.js | faucet"},"bin":{"generify":"./generify.js"},"repository":{"type":"git","url":"https://github.com/mcollina/generify.git"},"keywords":["project","generator","module"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","bugs":{"url":"https://github.com/mcollina/generify/issues"},"homepage":"https://github.com/mcollina/generify","devDependencies":{"faucet":"0.0.1","osenv":"^0.1.0","tape":"^3.0.0"},"dependencies":{"mkdirp":"^0.5.0","split2":"^0.2.1","walker":"^1.0.6"},"gitHead":"e583d88f5fa7873eb294b235d50e29efb088833f","_id":"generify@1.0.0","_shasum":"3f950be6738711968cb082ad97007f02fcdd1836","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"maintainers":[{"name":"matteo.collina","email":""}],"dist":{"shasum":"3f950be6738711968cb082ad97007f02fcdd1836","size":3465,"noattachment":false,"key":"/generify/-/generify-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/generify/download/generify-1.0.0.tgz"},"directories":{},"publish_time":1413532718727,"_cnpm_publish_time":1413532718727,"_hasShrinkwrap":false}},"readme":"# generify&nbsp;&nbsp;![Build Status](https://github.com/mcollina/generify/workflows/ci/badge.svg)\n\nA reusable project generator that _copies file recursively_, while\nreplacing keywords from passed data.\n\n## Example\n\n```js\n'use strict'\n\nconst generify = require('generify')\nconst source = './template'\nconst dest = '/tmp/generify-test'\nconst data = { hello: 'hello world' }\n\n// without notification\ngenerify(source, dest, data, function (err) {\n  if (err) {\n    console.log(err)\n  } else {\n    console.log('ok!')\n  }\n})\n\n// with notification\ngenerify(source, dest, data, onData, done)\n\nfunction onData (file) {\n  console.log('writing file')\n}\n\nfunction done (err) {\n  if (err) {\n    console.log(err)\n  } else {\n    console.log('ok!')\n  }\n}\n```\n\nThis will replace all the `__hello__` patterns found in all files\nwith the `'hello world'` string.\n\nIf the supplied `data` has a key `transforms`, with a hash of tranformation\nfunctions, then the found tokens will be used to run a corresponding\ntransform on the supplied data. Example:\n\n```js\nconst data = {\n  transforms: { foo: (data, context) => data.toUpperCase() },\n  foo: 'foo'\n}\n\n// __foo__ => foo_transform(data = 'foo') => 'FOO'\n```\n\nThe `context` object contains properties: `source` (input file path),\n`dest` (output file path), `key` (the matched key).\n\n### Files and Directories\n\nfiles and directories located in the template folder may also be replaced. File and folder names wrapped with `@` delimiters will be replaced.\n\n#### Example\n\nGiven a template with:\n\n`/template/@foo@/@bar@.txt`\n\nand data:\n\n```js\nconst data = {\n  foo: 'hello',\n  bar: 'world'\n}\n```\n\nThe outputted file will be:\n\n`<dest>/hello/world.txt`\n\n### `__` handling\n\nIf a file begins with `__` that will be automatically converted into a\n`.`. This is useful for generating `.gitignore` files.\n\nIf the supplied `data` has a key `copyAsNamed`, with an array of names, then\nthe filenames in that list will not be processed through this rule. Each file\nname in the list should not include a path,\ne.g. `['__do-not-replace-underscores.js']`.\n\n## Executable\n\n__generify__ also offers an executable that can be called with:\n\n  Usage: generify template destination [json file]\n\nWhere the json file contains the data to be replaced.\n\n## Acknowledgements\n\nThis project was kindly sponsored by [nearForm](http://nearform.com).\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/mcollina/generify","bugs":{"url":"https://github.com/mcollina/generify/issues"},"license":"MIT"}