From 3ca03b3fba16598bf2c234309243ec1810d62766 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 22 Feb 2017 21:43:38 +0900 Subject: [PATCH] Refactor --- src/const.json | 3 ++- src/web/app/base.styl | 6 ++++-- webpack.config.ts | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/const.json b/src/const.json index 4c8d05cb53..f31fc02381 100644 --- a/src/const.json +++ b/src/const.json @@ -1,3 +1,4 @@ { - "themeColor": "#f76d6c" + "themeColor": "#f76d6c", + "themeColorForeground": "#fff" } diff --git a/src/web/app/base.styl b/src/web/app/base.styl index 5a1da3813f..40823175cd 100644 --- a/src/web/app/base.styl +++ b/src/web/app/base.styl @@ -1,7 +1,9 @@ +json('../../const.json') + @charset 'utf-8' -$theme-color = #f76d6c -$theme-color-foreground = #fff +$theme-color = themeColor +$theme-color-foreground = themeColorForeground @import './reset' diff --git a/webpack.config.ts b/webpack.config.ts index 19e095a91c..b4b81b7d04 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -22,7 +22,7 @@ module.exports = (commit, env) => { exclude: /node_modules/, loader: StringReplacePlugin.replace({ replacements: [ - { pattern: /\$theme\-color\-foreground/g, replacement: () => '#fff' }, + { pattern: /\$theme\-color\-foreground/g, replacement: () => constants.themeColorForeground }, { pattern: /\$theme\-color/g, replacement: () => constants.themeColor }, ] })