writeout
Write out string files with various options.
Last updated a year ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install writeout 
SYNC missed versions from official npm registry.

writeout

Build Status Code Climate Code Coverage npm Version

Write out string files with various options.

Installation

npm install writeout --save

Usage

'use strict'

const writeout = require('writeout')

// Generate a file.
writeout('hello-wold', 'This is the contents text', {
  mkdirp: true,
  skipIfIdentical: true
}).then((result) => {
  if (!result.skipped) {
    console.log('File generated:', result.filename)
  }
}).catch((err) =>
  console.error(err)
)


Options

Name Default Description
mkdirp false Make parent directories.
skipIfIdentical false Skip to write if existing content is identical.
mode "644" File permission.
force false Force to write even if existing file is readonly.

License

This software is released under the MIT License.

Current Tags

  • 2.2.1                                ...           latest (a year ago)

20 Versions

  • 2.2.1                                ...           a year ago
  • 2.2.0                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 2.0.7                                ...           2 years ago
  • 2.0.6                                ...           2 years ago
  • 2.0.5                                ...           2 years ago
  • 2.0.4                                ...           3 years ago
  • 2.0.3                                ...           3 years ago
  • 2.0.2                                ...           3 years ago
  • 2.0.1                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.2.1                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.7                                ...           3 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago

Copyright 2014 - 2016 © taobao.org |