1 |
|
2 |
|
3 | const writeout = require('writeout')
|
4 |
|
5 | // Generate a file.
|
6 | writeout('hello-wold', 'This is the contents text', {
|
7 | mkdirp: true,
|
8 | skipIfIdentical: true
|
9 | }).then((result) => {
|
10 | if (!result.skipped) {
|
11 | console.log('File generated:', result.filename)
|
12 | }
|
13 | }).catch((err) =>
|
14 | console.error(err)
|
15 | )
|
16 |
|