Skip to content

Browserify transform to remove unwanted blank lines from your code.

License

Notifications You must be signed in to change notification settings

primus/condenseify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

condenseify

Version npmCICoverage Status

This module for Browserify will transform your js files condensing multiple blank (empty) lines into a single blank line. By default non empty lines containing only white spaces will be removed.

Install

npm install --save condenseify

Usage

Command Line

browserify main.js -t condenseify > bundle.js

API

Register the transform.

'use strict';

var condenseify = require('condenseify')
  , browserify = require('browserify')
  , fs = require('fs');

var b = browserify('main.js');
b.transform(condenseify);

b.bundle().pipe(fs.createWriteStream('bundle.js'));

Options

If you want to keep the blank (non empty) lines you can use the keep-non-empty option. Reusing the examples above, this translates into:

browserify main.js -t [ condenseify --keep-non-empty ] > bundle.js

for the command line and

b.transform(condenseify, { 'keep-non-empty': true });

for the API.

License

MIT

About

Browserify transform to remove unwanted blank lines from your code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published