Socket
Socket
Sign inDemoInstall

broccoli-file-creator

Package Overview
Dependencies
23
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    broccoli-file-creator

Broccoli plugin to create a file.


Version published
Weekly downloads
184K
decreased by-1.96%
Maintainers
2
Install size
1.16 MB
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 17 Apr 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc