From 892c7480f4f33e110ac794a43295581826dd4538 Mon Sep 17 00:00:00 2001 From: cp-dharti-r Date: Thu, 11 Jan 2024 10:23:51 +0530 Subject: [PATCH] Refactor vue library to not use dist folder in npm --- .github/workflows/publish.yml | 14 +++++++------- README.md | 2 +- vue/.gitignore | 7 ++++++- vue/README.md | 2 +- vue/examples/CanvasView.vue | 1 + vue/examples/LongSquareView.vue | 1 + vue/examples/RoundView.vue | 1 + vue/examples/SquareView.vue | 1 + vue/examples/demo/package-lock.json | 8 ++++---- vue/examples/demo/package.json | 2 +- vue/examples/demo/src/main.ts | 1 + vue/examples/demo/src/views/IndexView.vue | 6 ------ vue/package.json | 14 ++++++++++---- 13 files changed, 35 insertions(+), 25 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 65b1df9..b2675d7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,20 +19,20 @@ jobs: npm ci npm run build - # Check if the version already exists on npm + # Check if the vue-file-upload version already exists on npm - name: Check Version Existence id: check_version run: | - if npm show @canopassoftware/vue-file-upload@1.0.6; then + if npm show @canopassoftware/vue-file-upload@1.0.7; then echo "Version already published. Skipping npm publish." echo "::set-output name=skip_publish::true" else echo "::set-output name=skip_publish::false" fi - # Publish only if the version check passed + # Publish only if the vue-file-upload version check passed - name: Publish to npm - if: steps.check_version.outputs.skip_publish != 'true' + if: steps.check_version.outputs.skip_publish != true run: npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -50,7 +50,7 @@ jobs: npm ci npm run build - # Check if the version already exists on npm + # Check if the react-file-upload version already exists on npm - name: Check Version Existence id: check_version run: | @@ -61,9 +61,9 @@ jobs: echo "::set-output name=skip_publish::false" fi - # Publish only if the version check passed + # Publish only if the react-file-upload version check passed - name: Publish to npm - if: steps.check_version.outputs.skip_publish != 'true' + if: steps.check_version.outputs.skip_publish != true run: npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/README.md b/README.md index 705bac8..53b1450 100644 --- a/README.md +++ b/README.md @@ -172,4 +172,4 @@ This project is licensed under the [MIT](https://github.com/canopas/web-file-upl ## Contact Information -Vue file upload is owned and maintained by the [Canopas team](https://canopas.com/). You can reach out them on Github at [canopas](https://github.com/canopas) for questions or need support. +Web file upload is owned and maintained by the [Canopas team](https://canopas.com/). You can reach out them on Github at [canopas](https://github.com/canopas) for questions or need support. diff --git a/vue/.gitignore b/vue/.gitignore index 712cc3c..3fcff35 100644 --- a/vue/.gitignore +++ b/vue/.gitignore @@ -25,4 +25,9 @@ coverage *.ntvs* *.njsproj *.sln -*.sw? \ No newline at end of file +*.sw? + +index.mjs +index.umd.js +favicon.ico +style.css \ No newline at end of file diff --git a/vue/README.md b/vue/README.md index 042bcf7..f53d287 100644 --- a/vue/README.md +++ b/vue/README.md @@ -122,7 +122,7 @@ import { SingleFileUpload, MultipleFileUpload } from '@canopassoftware/vue-file- - Use `style.css` for UI by importing like, ```js -import "@canopassoftware/vue-file-upload/dist/style.css" +import "@canopassoftware/vue-file-upload/style.css" ``` ### Creating custom UI with file preview diff --git a/vue/examples/CanvasView.vue b/vue/examples/CanvasView.vue index a006ed9..52318fe 100644 --- a/vue/examples/CanvasView.vue +++ b/vue/examples/CanvasView.vue @@ -117,6 +117,7 @@