Implementation for automatically reading optional files

It automatically reads riotrc, riotrc.js, riot.config.js file and
applies it.
This commit is contained in:
Arika 2019-02-23 14:19:36 +09:00
parent 572411a459
commit d12330afd6

View File

@ -9,7 +9,7 @@ class RiotAsset extends Asset {
}
async generate() {
const riotOpts = {};
const riotOpts = (await this.getConfig(['.riotrc', '.riotrc.js', 'riot.config.js'])) || {};
let code = compile(this.contents, riotOpts, this.name);
code = `${ preamble }${ code }`;