2.0.4 • Published 6 years ago

pon-task-fmtjson v2.0.4

Weekly downloads
293
License
Apache-2.0
Repository
github
Last release
6 years ago

pon-task-fmtjson

Build Status npm Version JS Standard

Pon task to format json files

Installation

$ npm install pon-task-fmtjson --save

Usage

'use strict'

const pon = require('pon')
const fmtjson = require('pon-task-fmtjson')

async function tryExample () {
  const run = pon({
    'format:json': fmtjson(['src/**/*.json'], {
      sort: true,
      indent: 2
    })
  })

  run('format:*')
}

tryExample()

Signatures

define(patterns, options) -> function

Define task

ParamtypeDescription
patternsstring|string[]Target filename patterns
optionsObjectOptional settings
options.sortbooleanShould sort params
options.indentnumberJSON indent

License

This software is released under the Apache-2.0 License.

Links

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

1.0.1

7 years ago