Skip to content

realglobe-Inc/pon-task-fmtjson

Repository files navigation

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

About

Pon task to format json files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published