broccoli-file-creator

2.1.1 • Public • Published

Broccoli's File Creator

Build Status

Usage

Create a file named app/main.js with "some content goes here":

let writeFile = require('broccoli-file-creator');
let tree = writeFile('/app/main.js', 'some content goes here');

Documentation

writeFile(filename, content, fileOptions)


filename {String}

The path of the file to create.


content {String|Function|Promise}

The contents to write into the file.

writeFile('filename.txt', 'the-content');
writeFile('filename.txt', Promise.resolve('the-content'));
writeFile('filename.txt', () => 'the-content');
writeFile('filename.txt', () => Promise.resolve('the-content'));

note: If a function is provided, it will only be invoked once, on first build

ZOMG!!! TESTS?!?!!?

I know, right?

Running the tests:

npm install
npm test

License

This project is distributed under the MIT license.

/broccoli-file-creator/

    Package Sidebar

    Install

    npm i broccoli-file-creator

    Weekly Downloads

    192,757

    Version

    2.1.1

    License

    MIT

    Unpacked Size

    3.98 kB

    Total Files

    4

    Last publish

    Collaborators

    • rwjblue
    • stefanpenner