This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// styles/product-specific/_facebook-variables.scss | |
$colors: ( | |
product-primary-light: lighten(#415993, 4%), | |
product-primary: #415993, | |
product-primary-dark: darken(#415993, 4%), | |
product-accent: #3C3C3C, | |
product-accent-dark: darken(#3C3C3C, 4%), | |
product-text-on-light: #111, | |
product-background: #FFFFFF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// config/product-specific/styling.js | |
module.exports = () => { | |
switch (process.env.VUE_APP_DEV_PRODUCT) { | |
case 'google': | |
return '_variables-google'; | |
case 'amazon': | |
return '_variables-amazon'; | |
case 'facebook': | |
return '_variables-facebook'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// index.html | |
<link rel="icon" href="<%= BASE_URL %>favicon/<%= process.env.VUE_APP_DEV_PRODUCT %>.ico"> | |
// components | |
const imagePath = computed(() => { | |
return require(`./assets/product-specific/${process.env.VUE_APP_DEV_PRODUCT}/illustration.png`); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// config/product-specific/index.js | |
const config = require(`@/config/product-specific/${process.env.VUE_APP_DEV_PRODUCT}`); | |
export default config.default; | |
// App.vue | |
import config from '@/config/product-specific'; | |
export default defineComponent({ | |
setup() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// config/product-specific/amazon.js | |
const config = { | |
products: [ | |
{ | |
id: 1, | |
description: 'Have your order delivered the next day', | |
title: 'Amazon Prime', | |
url: 'https://www.amazon.com/amazonprime' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vue.config.js | |
const getVariablePath = require('./src/config/product-specific/styling'); | |
module.exports = { | |
css: { | |
loaderOptions: { | |
sass: { | |
additionalData: ` | |
@import "@/styles/global/_variables.scss"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// styles/product-specific/_variables-amazon.scss | |
$colors: ( | |
product-primary-light: lighten(#F29D38, 4%), | |
product-primary: #F29D38, | |
product-primary-dark: darken(#F29D38, 4%), | |
product-accent: #c89411, | |
product-accent-dark: darken(#c89411, 4%), | |
product-text-on-light: #111, | |
product-background: #D5DFEC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// styles/global/_variables.scss | |
$global-vars: ( | |
ui-default-measure: 8px, | |
ui-default-measure2x: 16px, | |
ui-default-measure3x: 24px, | |
ui-default-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.3), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VUE_APP_DEV_PRODUCT=amazon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createRouter, createWebHistory } from "vue-router"; | |
const routes = [ | |
{ | |
path: '/dashboard', | |
name: 'Dashboard', | |
component: () => | |
import(/* webpackChunkName: 'dashboard' */ '../views/Dashboard.vue') | |
}, | |
{ |
NewerOlder