Skip to content

michelle/broccoli-json-global

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

broccoli-json-global

Installation

npm install --save-dev broccoli-json-global

Usage

var jsonGlobal = require('broccoli-json-global');

tree = jsonGlobal('public/data', {

  // The name of your globals object. Default is JSON_DATA.
  globalName: 'GLOBALS',

  // Whether or not to nest data. Keys will be the file name. Default is false.
  nestData: true

});

About

Takes a JSON tree and converts it to a .js file that exposes it globally.

Resources

License

Stars

Watchers

Forks

Packages

No packages published