pon-task-fmtjson

2.0.4 • Public • Published

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

Param type Description
patterns string|string[] Target filename patterns
options Object Optional settings
options.sort boolean Should sort params
options.indent number JSON indent

License

This software is released under the Apache-2.0 License.

Links

Readme

Keywords

Package Sidebar

Install

npm i pon-task-fmtjson

Weekly Downloads

3

Version

2.0.4

License

Apache-2.0

Unpacked Size

29.4 kB

Total Files

30

Last publish

Collaborators

  • realglobe