hjs

hjsonify

A Browserify transform for hjson files.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

3

Maintenance

Last Commit

7yrs ago

Contributors

0

Package

Dependencies

2

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

NPM version shield License shield

hjsonify

hjsonify is a browserify transform to require Human JSON (Hjson) files.

Require Hjson files in your files just like you would a JSON file.

Install

$ npm install hjsonify

Usage

Programmatic use with Browserify:

var b = require('browserify')(),
    fs = require('fs'),
    hjsonify = require('hjsonify');

b.add('./app.js');
b.transform(hjsonify);
b.bundle().pipe(fs.createWriteStream('./bundle.js'));

CLI use with Browserify:

$ browserify -t hjsonify app.js > bundle.js

Example

config.hjson:

{
  port: 1000 //defaults to 80
}

app.js:

var config = require('./config.hjson');
console.log(config.port);
$ browserify -t hjsonify app.js | node
1000

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial