You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

generify

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generify

A reusable project generator

2.0.0
Source
npmnpm
Version published
Maintainers
1
Created
Source

generify  Build Status

A reusable project generator that copies file recursively, while replacing keywords from passed data.

Example

'use strict'

const generify = require('generify')
const source = './template'
const dest = '/tmp/generify-test'
const data = { hello: 'hello world' }

generify(source, dest, data, function(err) {
  if (err) {
    console.log(err)
  } else {
    console.log('ok!')
  }
})

This will replace all the __hello__ patterns found in all files with the 'hello world' string.

__ handling

If a file begins with __ that will be automatically converted into a .. This is useful for generating .gitignore files.

Executable

generify also offers an executable that can be called with:

Usage: generify template destination [json file]

Where the json file contains the data to be replaced.

Acknowledgements

This project was kindly sponsored by nearForm.

License

MIT

Keywords

project

FAQs

Package last updated on 04 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts