Nothing Plus Modules

    deepjson

    0.0.1 • Public • Published

    deepJSON

    Arrange big json configs along folders and files

    Build Status

    Installation

    Install with npm

    $ npm install deepjson
    

    Example

    .jsons and folders structure:

    ├── config.json {"appname": "Fruits app", port: 3000}
    ├── config (folder)
    │   ├── SEO.json {"title": "Greengrocer", "description": "Fresh lemmons!" }
    │   ├── SEO (folder)
    │   │   ├── keywords.json : ["apples", "oranges", "lemmons"]
    ├── production.json {port: 4444}
    
    var deepjson = require( 'deepjson' );
    
    var defaultConfig = deepjson( 'config.json' );
    /* {
        appname: 'Fruits app',
        port: 3000,
        SEO: {
            title: 'Greengrocer',
            description': 'Fresh lemmons!'
            keywords: ['apples', 'oranges', 'lemmons']
        }
    } */
    
    
    var productionConfig = deepjson( 'config.json', 'production.json' );
    /* {
        appname: 'Fruits app',
        port: 4444,
        SEO: {
            title: 'Greengrocer',
            description': 'Fresh lemmons!'
            keywords: ['apples', 'oranges', 'lemmons']
        }
    } */

    Tests

    npm install && npm test
    




    © 2014 Jacobo Tabernero

    Released under MIT License

    Keywords

    Install

    npm i deepjson@0.0.1

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • jacoborus