propertiesify
A Browserify transform which allows .properties files to be required.
Enables .property files to be required into a module as a JS object hash. Useful for loading localisation resource bundles or configuration.
Installation
Using npm
as a development dependency
npm install propertiesify --save-dev
Configuration
propertiesify uses the properties module and supports the same options
object.
All properties are supported, apart from path
which will be ignored.
Usage
in example/locales/en_US.properties
# en_USTITLE=Example App
in example/main.js
var resources = ; console; // Outputs: 'Example App'
Transform with the API
var browserify = ;var fs = ;var b = ;b;b;
Transform with CML
browserify example/main.js -t propertiesify > bundle.js