0.1.0 • Published 4 years ago

genfile v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

genFile

Generate File

Installation

npm install genfile --save-dev
# or
yarn add genfile --dev

Usage

// import genFile from 'genfile';
const genFile = require('genfile');

// { filename, template, path? = '', update? = false }
genFile({
  filename: 'test.txt', // filename
  template: 'test genFile', // file content(object | string)
  // path: 'test/a/b', // file path
  // update: true, // update file content
})

Promise.all([
  genFile({
    filename: './test/file/a.txt',
    template: 'test a',
  }),
  genFile({
    filename: './test/file/b.txt',
    template: 'test b',
  })
]).then(state => console.info(state));

Tip:

  • Optional parameter: path, update
  • default value: path = '', update = false
0.1.0

4 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago