broccoli-file-creator

WebJar for broccoli-file-creator

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

broccoli-file-creator
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

broccoli-file-creator
WebJar for broccoli-file-creator
Project URL

Project URL

http://webjars.org

Download broccoli-file-creator

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/broccoli-file-creator/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>broccoli-file-creator</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/broccoli-file-creator/
implementation 'org.webjars.npm:broccoli-file-creator:1.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/broccoli-file-creator/
implementation ("org.webjars.npm:broccoli-file-creator:1.1.0")
'org.webjars.npm:broccoli-file-creator:jar:1.1.0'
<dependency org="org.webjars.npm" name="broccoli-file-creator" rev="1.1.0">
  <artifact name="broccoli-file-creator" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='broccoli-file-creator', version='1.1.0')
)
libraryDependencies += "org.webjars.npm" % "broccoli-file-creator" % "1.1.0"
[org.webjars.npm/broccoli-file-creator "1.1.0"]

Dependencies

compile (6)

Group / Artifact Type Version
org.webjars.npm : broccoli-plugin jar [1.1.0,2)
org.webjars.npm : rsvp jar [3.0.6,3.1)
org.webjars.npm : broccoli-writer jar [0.1.1,0.2)
org.webjars.npm : broccoli-kitchen-sink-helpers jar [0.2.0,0.3)
org.webjars.npm : symlink-or-copy jar [1.0.1,2)
org.webjars.npm : mkdirp jar [0.5.1,0.6)

Project Modules

There are no modules declared in this project.

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.

Versions

Version
1.1.0