From d2cfbbfe0c909971b74fd3ddf88af77d6812f827 Mon Sep 17 00:00:00 2001 From: Sergey Solodyagin Date: Tue, 14 Dec 2021 17:50:06 +0300 Subject: [PATCH] feat: sass based themes (more customization) --- jsconfig.json | 6 - lib/components/GGanttChart.vue | 62 +- lib/components/GGanttRow.vue | 26 +- lib/components/GGanttTimeaxis.vue | 29 +- lib/components/GanttasticThemeColors.js | 113 ---- lib/index.js | 2 +- .../{vue-ganttastic.scss => _ganttastic.scss} | 97 ++-- lib/scss/_variables.scss | 13 + lib/scss/index.scss | 36 ++ lib/scss/themes/creamy/_variables.scss | 7 + lib/scss/themes/creamy/index.scss | 3 + lib/scss/themes/crimson/_variables.scss | 7 + lib/scss/themes/crimson/index.scss | 3 + lib/scss/themes/dark/_variables.scss | 10 + lib/scss/themes/dark/index.scss | 3 + lib/scss/themes/flare/_variables.scss | 7 + lib/scss/themes/flare/index.scss | 3 + lib/scss/themes/fuchsia/_variables.scss | 9 + lib/scss/themes/fuchsia/index.scss | 3 + lib/scss/themes/grove/_variables.scss | 7 + lib/scss/themes/grove/index.scss | 3 + lib/scss/themes/material-blue/_variables.scss | 7 + lib/scss/themes/material-blue/index.scss | 3 + lib/scss/themes/sky/_variables.scss | 7 + lib/scss/themes/sky/index.scss | 3 + lib/scss/themes/slumber/_variables.scss | 10 + lib/scss/themes/slumber/index.scss | 3 + lib/scss/themes/vue/_variables.scss | 7 + lib/scss/themes/vue/index.scss | 3 + package-lock.json | 543 +++++++++++++++--- package.json | 4 +- src/App.vue | 31 +- vetur.config.js | 8 + vue.config.js | 9 +- 34 files changed, 758 insertions(+), 329 deletions(-) delete mode 100644 jsconfig.json delete mode 100644 lib/components/GanttasticThemeColors.js rename lib/scss/{vue-ganttastic.scss => _ganttastic.scss} (76%) create mode 100644 lib/scss/_variables.scss create mode 100644 lib/scss/index.scss create mode 100644 lib/scss/themes/creamy/_variables.scss create mode 100644 lib/scss/themes/creamy/index.scss create mode 100644 lib/scss/themes/crimson/_variables.scss create mode 100644 lib/scss/themes/crimson/index.scss create mode 100644 lib/scss/themes/dark/_variables.scss create mode 100644 lib/scss/themes/dark/index.scss create mode 100644 lib/scss/themes/flare/_variables.scss create mode 100644 lib/scss/themes/flare/index.scss create mode 100644 lib/scss/themes/fuchsia/_variables.scss create mode 100644 lib/scss/themes/fuchsia/index.scss create mode 100644 lib/scss/themes/grove/_variables.scss create mode 100644 lib/scss/themes/grove/index.scss create mode 100644 lib/scss/themes/material-blue/_variables.scss create mode 100644 lib/scss/themes/material-blue/index.scss create mode 100644 lib/scss/themes/sky/_variables.scss create mode 100644 lib/scss/themes/sky/index.scss create mode 100644 lib/scss/themes/slumber/_variables.scss create mode 100644 lib/scss/themes/slumber/index.scss create mode 100644 lib/scss/themes/vue/_variables.scss create mode 100644 lib/scss/themes/vue/index.scss create mode 100644 vetur.config.js diff --git a/jsconfig.json b/jsconfig.json deleted file mode 100644 index 1940559..0000000 --- a/jsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": "." - }, - "exclude": ["node_modules", "dist"] -} diff --git a/lib/components/GGanttChart.vue b/lib/components/GGanttChart.vue index 5213691..df2c1f0 100644 --- a/lib/components/GGanttChart.vue +++ b/lib/components/GGanttChart.vue @@ -1,47 +1,48 @@ - + diff --git a/vetur.config.js b/vetur.config.js new file mode 100644 index 0000000..20c36f5 --- /dev/null +++ b/vetur.config.js @@ -0,0 +1,8 @@ +// vetur.config.js +/** @type {import('vls').VeturConfig} */ +module.exports = { + settings: { + 'vetur.ignoreProjectWarning': true, + }, + projects: ['./'], +} diff --git a/vue.config.js b/vue.config.js index 7a6d7fe..20778fd 100644 --- a/vue.config.js +++ b/vue.config.js @@ -4,7 +4,14 @@ const isBuildLib = module.exports = { publicPath: '', outputDir: isBuildLib ? 'dist' : 'demo', - css: { extract: true }, + css: { + loaderOptions: { + sass: { + implementation: require('sass') + } + }, + extract: true + }, productionSourceMap: false, chainWebpack: config => { if (process.env.VUE_CLI_BUILD_TARGET === 'lib') {