index.js
function createFile(tree, name, prop, options) {
    var opts = utils.extend({}, options);
    var str = create(tree[name], {label: 'cwd'});
    var file = new utils.File({path: `${prop}-${name}.txt`, contents: new Buffer(str)});

    if (typeof opts.treename === 'function') {
      opts.treename(file);
    }
    file.writeFile = true;
    file.render = false;
    file.layout = null;
    file.isTree = true;
    utils.contents.sync(file);
    return file;
  }
function createFile(tree, name, prop, options) {
    var opts = utils.extend({}, options);
    var str = create(tree[name], {label: 'cwd'});
    var file = new utils.File({path: `${prop}-${name}.txt`, contents: new Buffer(str)});

    if (typeof opts.treename === 'function') {
      opts.treename(file);
    }
    file.writeFile = true;
    file.render = false;
    file.layout = null;
    file.isTree = true;
    utils.contents.sync(file);
    return file;
  }
function createFile ( tree , name , prop , options ) { var opts = utils . extend ( { } , options ) ; var str = create ( tree [ name ] , { label : 'cwd' } ) ; var file = new utils . File ( { path : ` ${ prop } ${ name } ` , contents : new Buffer ( str ) } ) ; if ( typeof opts . treename === 'function' ) { opts . treename ( file ) ; } file . writeFile = true ; file . render = false ; file . layout = null ; file . isTree = true ; utils . contents . sync ( file ) ; return file ; }
Create a file
Create a file