1.0.2 • Published 8 years ago

jayeff v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

jayeff

Convert json to a file tree

Install

$ npm i jayeff

Usage

// Our converter
const jayeff = require('jayeff');
// The json we want to convert
const fileStructure = require('./tree.json');
// Where we want the dir tree to go
const rootDirectory = './';

// just call the func, pass in the stuff.
// rootDirectory is optional, defaults to the current dir.
jayeff(fileStructure, rootDirectory);

console.log('Done');

json should be like this:

{
	"app": {
		"index.js": "hola"
	}
}

If it's an object, a directory is created. If it's a string, a file is created with the string as content.

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago