1.0.0 • Published 8 years ago

osia-beautify v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

osia-beautify

Beautifer plugin for Osia

Installation

$ npm install osia-beautify

Usage

import osia from 'osia';
import beautify from 'osia-beautify';

osia.task('beautify', () =>
  osia.open('./foo.html')
    .then(beautify())
    .then(osia.save('./'))
);

Options

osia-beautify uses js-beautify natively, so you can pass options in as you would with js-beautify

Example:

import osia from 'osia';
import beautify from 'osia-beautify';

osia.task('beautify', () =>
  osia.open('./foo.html')
    .then(beautify({ indent_size: 2 }))
    .then(osia.save('./'))
);

Credits

seanc
Sean Wilson