0.1.3 • Published 3 years ago

directree.js v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

directree.js

Create directory trees with files and content

Build Status Greenkeeper badge

Install

npm install directree.js

Usage

const directree = require('directree.js')

directree({
  '.gitignore': 'node_modules',
  'README.md': '# my project',
  'index.js': 'module.exports = () => "hello"',
  'spec': {
    'index.spec.js':'const hello = require("../index");',
  },
});

Pass file tree representation as a simple json object to directree(json, root).

Keys are used as file/dir name. If the value is of type string type, a file will be created. If value is an object, directory will be created.

We can optionally pass root directory. If not passed "." is used as default.

0.1.3

3 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.1

7 years ago