From 708014413ccedd427f5d8ccc55dcc7527749a0bd Mon Sep 17 00:00:00 2001
From: InfectoOne <28678851+InfectoOne@users.noreply.github.com>
Date: Wed, 21 Sep 2022 18:19:44 +0200
Subject: [PATCH] Bumped version to 2.1.1 Renamed file useBarDrag to
createBarDrag Re-enabled default import Added plugin for auto-injecting CSS
in vite build Updated README
---
README.md | 19 +++++++++++++++++++
package-lock.json | 17 +++++++++++++++--
package.json | 3 ++-
.../{useBarDrag.ts => createBarDrag.ts} | 0
src/composables/useBarDragManagement.ts | 2 +-
src/index.ts | 2 ++
src/main.ts | 2 +-
vite.config.ts => vite.config.mts | 8 +++++++-
8 files changed, 47 insertions(+), 6 deletions(-)
rename src/composables/{useBarDrag.ts => createBarDrag.ts} (100%)
rename vite.config.ts => vite.config.mts (85%)
diff --git a/README.md b/README.md
index c5d0a56f..da722f62 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,9 @@
/>
Vue Ganttastic is a simple, interactive and highly customizable Gantt chart component for Vue 3.
+
+![image](https://user-images.githubusercontent.com/28678851/148191571-76bd8d61-4583-4538-8c59-cc2915494890.png)
+
@@ -92,6 +95,22 @@ const row2BarList = ref([
```
+## Contributing
+Clone the project, make some changes, test your changes out, create a pull request with a short summary of what changes you made. Contributing is warmly welcomed!
+
+To test your changes out before creating a pull request, create a build:
+```
+npm run build
+```
+To test out the build, you should create a tarball using:
+```
+npm pack
+```
+Then, place the tarball in some other test project and install the package from the tarball by using:
+```
+npm install .tgz
+```
+
## Guide and Docs
For further guides and references, check out the [official docs](https://infectoone.github.io/vue-ganttastic/getting-started.html).
diff --git a/package-lock.json b/package-lock.json
index b48e8137..4eb5072c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,15 +1,16 @@
{
"name": "@infectoone/vue-ganttastic",
- "version": "3.0.0",
+ "version": "2.1.1-beta",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@infectoone/vue-ganttastic",
- "version": "3.0.0",
+ "version": "2.1.1-beta",
"license": "MIT",
"devDependencies": {
"@rushstack/eslint-patch": "^1.1.4",
+ "@senojs/rollup-plugin-style-inject": "^0.1.1",
"@types/node": "^16.11.58",
"@types/postcss-preset-env": "^7.7.0",
"@vitejs/plugin-vue": "^3.1.0",
@@ -621,6 +622,12 @@
"integrity": "sha512-LwzQKA4vzIct1zNZzBmRKI9QuNpLgTQMEjsQLf3BXuGYb3QPTP4Yjf6mkdX+X1mYttZ808QpOwAzZjv28kq7DA==",
"dev": true
},
+ "node_modules/@senojs/rollup-plugin-style-inject": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/@senojs/rollup-plugin-style-inject/-/rollup-plugin-style-inject-0.1.1.tgz",
+ "integrity": "sha512-fyWem2biFQr0B+O+PHod6++cGDmDYF9kGcwwfqvTFO9IZByqNO+Pla87YEhR73vxyBXDsywRo0xf4lV/xnnYYA==",
+ "dev": true
+ },
"node_modules/@types/debug": {
"version": "4.1.7",
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz",
@@ -7077,6 +7084,12 @@
"integrity": "sha512-LwzQKA4vzIct1zNZzBmRKI9QuNpLgTQMEjsQLf3BXuGYb3QPTP4Yjf6mkdX+X1mYttZ808QpOwAzZjv28kq7DA==",
"dev": true
},
+ "@senojs/rollup-plugin-style-inject": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/@senojs/rollup-plugin-style-inject/-/rollup-plugin-style-inject-0.1.1.tgz",
+ "integrity": "sha512-fyWem2biFQr0B+O+PHod6++cGDmDYF9kGcwwfqvTFO9IZByqNO+Pla87YEhR73vxyBXDsywRo0xf4lV/xnnYYA==",
+ "dev": true
+ },
"@types/debug": {
"version": "4.1.7",
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz",
diff --git a/package.json b/package.json
index 672a8af6..4434bee9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@infectoone/vue-ganttastic",
- "version": "3.0.0",
+ "version": "2.1.1",
"description": "A simple and customizable Gantt chart component for Vue.js",
"author": "Marko Zunic (@infectoone)",
"scripts": {
@@ -23,6 +23,7 @@
],
"devDependencies": {
"@rushstack/eslint-patch": "^1.1.4",
+ "@senojs/rollup-plugin-style-inject": "^0.1.1",
"@types/node": "^16.11.58",
"@types/postcss-preset-env": "^7.7.0",
"@vitejs/plugin-vue": "^3.1.0",
diff --git a/src/composables/useBarDrag.ts b/src/composables/createBarDrag.ts
similarity index 100%
rename from src/composables/useBarDrag.ts
rename to src/composables/createBarDrag.ts
diff --git a/src/composables/useBarDragManagement.ts b/src/composables/useBarDragManagement.ts
index 49698e76..084848d6 100644
--- a/src/composables/useBarDragManagement.ts
+++ b/src/composables/useBarDragManagement.ts
@@ -1,7 +1,7 @@
import type { GanttBarObject } from "../types"
import { ref } from "vue"
-import createBarDrag from "./useBarDrag"
+import createBarDrag from "./createBarDrag"
import useDayjsHelper from "./useDayjsHelper"
import provideConfig from "../provider/provideConfig"
import provideGetChartRows from "../provider/provideGetChartRows"
diff --git a/src/index.ts b/src/index.ts
index 1c59262b..19f52ccb 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -24,3 +24,5 @@ export const ganttastic: Plugin = {
app.component("GGanttRow", GGanttRow)
}
}
+
+export default ganttastic
diff --git a/src/main.ts b/src/main.ts
index 391f6c2e..9fd1b926 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,5 +1,5 @@
import { createApp } from "vue"
import Playground from "./GanttPlayground.vue"
-import { ganttastic } from "./index"
+import ganttastic from "./index"
createApp(Playground).use(ganttastic).mount("#app")
diff --git a/vite.config.ts b/vite.config.mts
similarity index 85%
rename from vite.config.ts
rename to vite.config.mts
index 9af8087d..a7060775 100644
--- a/vite.config.ts
+++ b/vite.config.mts
@@ -3,10 +3,16 @@ import { fileURLToPath, URL } from "node:url"
import { defineConfig } from "vite"
import vue from "@vitejs/plugin-vue"
import postcssPresetEnv from "postcss-preset-env"
+import styleInject from "@senojs/rollup-plugin-style-inject"
// https://vitejs.dev/config/
export default defineConfig({
- plugins: [vue()],
+ plugins: [
+ vue(),
+ styleInject({
+ insertAt: "top"
+ })
+ ],
css: {
postcss: {
plugins: [postcssPresetEnv()]