1.0.0 • Published 9 years ago
makara-writer-amd v1.0.0
makara-writer-amd
Creates AMD formatted language bundles from .properties
files.
API
Default exported function
module.exports = function writeLocale(appRoot) {...
appRoot {String}
: filesystem path where locale directory resides@returns {Function}
:function (locale, cb) {
locale {String}
: (e.g.fr-FR
)cb {Function}
: errback or called when all.properties
files under the given locale directory (appRoot/FR/fr/
) are transformed into an AMD moduleappRoot/.build/fr-FR/_languagepack.js
amdBuilder
module.exports.amdBuilder = function (localeRoot, m, cb) {...
localeRoot {String}
: filesystem folder under which yourCOUNTRY/language
directories residem {Array}
: wherem[1]
is a language code (en) andm[2]
is a country code (US)cb {Function}
: called as errback if any downstream errors, otherwise returns a String of the AMD module