track-config
v0.0.6
Published
Configure for track.
Downloads
3
Readme
TrackConfig
Configure for track.
Installation
npm
npm install track-config
Usage
const TrackConfig = require('track-config');
TrackConfig.configure((c) => {
c.m = require('mithril');
c.loader = function(module) {
return require(`./app/${module}`);
};
c.localeLoader = function(module) {
return require(`./locales/${module}.yml`);
};
c.localeSelector = function(url) {
return url.indexOf('ja') != -1 ? 'ja' : 'en';
};
c.relativeUrlRoot = '/my-app';
});