diff --git a/config/env/lottery.config.example.js b/config/env/lottery.config.example.js new file mode 100644 index 0000000..37f881b --- /dev/null +++ b/config/env/lottery.config.example.js @@ -0,0 +1,8 @@ +module.exports = { + name: "NAME", + phone: "PHONE NUMBER", + price: 10, + message: "VINLOTTERI", + date: 5, + hours: 15 +}; diff --git a/config/env/lottery.config.js b/config/env/lottery.config.js new file mode 100644 index 0000000..9495a2f --- /dev/null +++ b/config/env/lottery.config.js @@ -0,0 +1,8 @@ +module.exports = { + name: "Kasper Rynning-Tønnesen", + phone: "977 40 427", + price: 10, + message: "Vinlotteri 🍾", + date: 5, + hours: 15 +}; diff --git a/config/webpack.config.common.js b/config/webpack.config.common.js index be58dce..dcd817f 100644 --- a/config/webpack.config.common.js +++ b/config/webpack.config.common.js @@ -1,5 +1,7 @@ "use strict"; +const env = require("./env/lottery.config.js"); +const webpack = require("webpack"); const VueLoaderPlugin = require("vue-loader/lib/plugin"); const MiniCSSExtractPlugin = require("mini-css-extract-plugin"); const HtmlPlugin = require("html-webpack-plugin"); @@ -68,7 +70,17 @@ const webpackConfig = function(isDev) { } ] }, - plugins: [new VueLoaderPlugin()] + plugins: [ + new VueLoaderPlugin(), + new webpack.DefinePlugin({ + __NAME__: JSON.stringify(env.name), + __PHONE__: JSON.stringify(env.phone), + __PRICE__: env.price, + __MESSAGE__: JSON.stringify(env.message), + __DATE__: env.date, + __HOURS__: env.hours + }) + ] }; }; diff --git a/src/ui/Banner.vue b/src/ui/Banner.vue index eeb7a6e..614e4b5 100644 --- a/src/ui/Banner.vue +++ b/src/ui/Banner.vue @@ -1,7 +1,7 @@