From d12330afd63675d5fbf9ad3cc943f5b1aa8e4fa8 Mon Sep 17 00:00:00 2001 From: Arika Date: Sat, 23 Feb 2019 14:19:36 +0900 Subject: [PATCH] Implementation for automatically reading optional files It automatically reads riotrc, riotrc.js, riot.config.js file and applies it. --- RiotAsset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RiotAsset.js b/RiotAsset.js index da5f784..e13f76a 100644 --- a/RiotAsset.js +++ b/RiotAsset.js @@ -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 }`;