Skip to content

Commit

Permalink
scripts: added scripts to automatically update shared package files d…
Browse files Browse the repository at this point in the history
…uring deployment; Fixed links to images in README;
  • Loading branch information
yamogoo committed Jul 10, 2024
1 parent 6c504b2 commit 4279827
Show file tree
Hide file tree
Showing 23 changed files with 126 additions and 75 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ dist-ssr
tests-report
# Local Netlify folder
.netlify

*-e
18 changes: 3 additions & 15 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,8 @@ MIT License

Copyright (c) 2024 yamogoo (Mikhail Grebennikov)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
![image](./demo/public/resize-bounding.svg)
![image](https://raw.githubusercontent.com/yamogoo/vue3-resize-bounding/v1.0.3/images/resize-bounding.svg)

# Vue3 Resize Bounding ![Version](https://img.shields.io/badge/version-1.0.2-blue) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
# Vue3 Resize Bounding ![Version](https://img.shields.io/badge/version-1.0.3-blue) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**Vue3 Resize Bounding** is a simple, custom component for Vue 3 that allows you to intuitively resize nested components using draggable border panels. It easily increases interactivity and control.

![image](./demo/public/resize-bounding.gif)
![image](https://github.com/yamogoo/vue3-resize-bounding/blob/v1.0.3/images/resize-bounding.gif)

[Demo](https://vue3-resize-bounding.netlify.app/)

[Figma UI Component](https://www.figma.com/community/file/1392603830584852243)

> **Examples**
>
> - [Interactive Grid](https://github.com/yamogoo/vue3-resize-bounding/blob/main/packages/playground/vite-app/src/components/InteractiveGrid.vue)
Expand Down
15 changes: 0 additions & 15 deletions build.sh

This file was deleted.

11 changes: 7 additions & 4 deletions demo/components/atoms/cover/Guide.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
>
{{ name }}
</AtomsLinkBoxed>
<!-- <AtomsLinkBoxed>
<AtomsLinkBoxed @copy="onCopy(figmaUrl)">
<AtomsLinkBasic
:size="'lg'"
:icon-name="'figma-logo'"
:to="'/'"
:name="'Vue3ResizeBounding'"
:to="figmaUrl"
:name="'ResizeBounding'"
filled
/>
</AtomsLinkBoxed> -->
</AtomsLinkBoxed>
</div>
</template>

Expand All @@ -41,6 +41,9 @@ const onCopy = (name: string | undefined): void => {
if (name) navigator.clipboard.writeText(name);
};
const figmaUrl =
"https://www.figma.com/community/file/1392603830584852243/resize-bounding";
const colorMode = useColorMode();
const onChangeTheme = () => {
Expand Down
14 changes: 9 additions & 5 deletions demo/components/atoms/menu/Tabbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,25 @@ export interface TabbarItem<T> {
&__item {
@include use-font-size(--sm);
@include themify($app-themes) {
color: themed("text", "primary");
}
cursor: pointer;
&:not(.active) {
opacity: 0.35;
@include themify($app-themes) {
color: themed("text", "primary");
}
&:hover {
opacity: 0.5 !important;
@include themify($app-themes) {
color: themed("colors", "accent");
}
}
}
&.active {
opacity: 1;
@include themify($app-themes) {
color: themed("colors", "accent");
}
}
}
}
Expand Down
21 changes: 21 additions & 0 deletions demo/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,27 @@ export default defineNuxtConfig({
rel: "stylesheet",
href: "https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap",
},
{
rel: "apple-touch-icon",
sizes: "180x180",
href: "/favicon/apple-touch-icon.png",
},
{
rel: "icon",
type: "image/png",
sizes: "32x32",
href: "/favicon/favicon-32x32.png",
},
{
rel: "icon",
type: "image/png",
sizes: "16x16",
href: "/favicon/favicon-16x16.png",
},
{
rel: "manifest",
href: "/favicon/site.webmanifest",
},
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Simple Vue 3 component for resizing nested components",
"private": true,
"version": "1.0.0",
"productVersion": "1.0.2",
"productVersion": "1.0.3",
"type": "module",
"author": {
"name": "yamogoo",
Expand Down
Binary file removed demo/public/favicon.ico
Binary file not shown.
Binary file added demo/public/favicon/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/public/favicon/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/public/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/public/favicon/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/public/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/public/favicon/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions demo/public/favicon/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
8 changes: 4 additions & 4 deletions demo/styles/abstracts/themes/_palette.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
$c-white: #ffffff;
$c-black: #303030;
$c-black: #232323;

$c-dark-gray: #1f1f1f;
$c-deep-gray: #242424;
$c-dark-gray: #171717;
$c-deep-gray: #1a1a1a;
$c-gray: #4e4e4e;
$c-light-gray: #aeaeae;
$c-fade-gray: #c9c8c8;

$c-app--light: #e8ebec;
$c-app--light: #eeeff0;
$c-container--light: #dbdede;
$c-app--dark: darken($c-black, 6%);
$c-container--dark: #212222;
Expand Down
11 changes: 6 additions & 5 deletions demo/styles/abstracts/themes/_themes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ $app-themes: (
background: (
primary: $c-black,
primary--invert: $c-white,
secondary: $c-app--dark,
secondary: #181818,
//$c-app--dark,
inactive: $c-deep-gray,
),
text: (
Expand All @@ -17,8 +18,8 @@ $app-themes: (
inactive: #656565,
),
border: (
primary: darken($c-gray, 8%),
secondary: darken($c-gray, 3%),
primary: darken($c-gray, 12%),
secondary: darken($c-gray, 12%),
),
scrollbar: (
thumb: $c-white,
Expand Down Expand Up @@ -58,8 +59,8 @@ $app-themes: (
inactive: #656565,
),
border: (
primary: lighten($c-fade-gray, 3%),
secondary: lighten($c-fade-gray, 3%),
primary: lighten($c-fade-gray, 6%),
secondary: lighten($c-fade-gray, 6%),
),
scrollbar: (
thumb: $c-black,
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "vue3-boundarize-monorepo",
"description": "Simple Vue 3 component for resizing nested components",
"description": "Simple Vue3 component for resizing nested components",
"version": "1.0.3",
"private": true,
"author": {
"name": "yamogoo",
Expand All @@ -9,9 +10,12 @@
"scripts": {
"preview:demo": "pnpm --filter resize-bounding-demo run dev",
"preview:example": "pnpm --filter vite-app dev",
"build": "pnpm --filter vue3-resize-bounding build",
"build": "pnpm prepare && pnpm --filter vue3-resize-bounding build",
"test:unit": "pnpm --filter vue3-resize-bounding test:unit",
"test:ui": "pnpm --filter vue3-resize-bounding test:ui",
"playground:vite": "pnpm --filter vite-app dev"
"playground:vite": "pnpm --filter vite-app dev",
"prepare": "bash prepare.sh",
"deploy:dev": "pnpm prepare && pnpm --filter resize-bounding-demo run deploy:dev",
"deploy:prod": "pnpm prepare && pnpm --filter resize-bounding-demo run deploy:prod"
}
}
18 changes: 3 additions & 15 deletions packages/vue3-resize-bounding/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,8 @@ MIT License

Copyright (c) 2024 yamogoo (Mikhail Grebennikov)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 changes: 5 additions & 3 deletions packages/vue3-resize-bounding/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
![image](./resize-bounding.svg)
![image](https://raw.githubusercontent.com/yamogoo/vue3-resize-bounding/v1.0.3/images/resize-bounding.svg)

# Vue3 Resize Bounding ![Version](https://img.shields.io/badge/version-1.0.2-blue) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
# Vue3 Resize Bounding ![Version](https://img.shields.io/badge/version-1.0.3-blue) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**Vue3 Resize Bounding** is a simple, custom component for Vue 3 that allows you to intuitively resize nested components using draggable border panels. It easily increases interactivity and control.

![image](./resize-bounding.gif)
![image](https://github.com/yamogoo/vue3-resize-bounding/blob/v1.0.3/images/resize-bounding.gif)

[Demo](https://vue3-resize-bounding.netlify.app/)

[Figma UI Component](https://www.figma.com/community/file/1392603830584852243)

> **Examples**
>
> - [Interactive Grid](https://github.com/yamogoo/vue3-resize-bounding/blob/main/packages/playground/vite-app/src/components/InteractiveGrid.vue)
Expand Down
4 changes: 2 additions & 2 deletions packages/vue3-resize-bounding/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue3-resize-bounding",
"description": "Simple Vue 3 component for resizing nested components",
"version": "1.0.2",
"description": "Simple Vue3 component for resizing nested components",
"version": "1.0.3",
"license": "MIT",
"author": {
"name": "yamogoo",
Expand Down
50 changes: 50 additions & 0 deletions prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

ICON=resize-bounding.svg
PREVIEW=resize-bounding.gif
README=README.md
IMAGES_PATH=images
LIB_PATH=packages/vue3-resize-bounding
DEMO_PATH=demo
DEMO_PUBLIC_PATH=$DEMO_PATH/public

MONOREPO_PACKAGE_JSON=package.json
DEMO_PACKAGE_JSON=$DEMO_PATH/package.json
LIB_PACKAGE_JSON=$LIB_PATH/package.json

MONOREPO_LICENSE=LICENSE
LIB_LICENSE=$LIB_PATH/LICENSE

VERSION_PATTERN="[[:digit:]][[:graph:]][[:digit:]][[:graph:]][[:digit:]]"

function get_version {
VERSION=$(grep version $1 | sed "s/.*\"version\": \"\($VERSION_PATTERN\)\".*/\1/")
}

function change_readme_version () {
sed -i -e "s/version-$VERSION_PATTERN-blue/version-$1-blue/g" $2
sed -i -e "s@/v$VERSION_PATTERN@/v$1@g" $2
}

function change_pkg_version {
sed -i -e "s@\(.*\"$1\"\): \"\(.*\)\"@\1: ""\"$VERSION\"@" $2
}

get_version $MONOREPO_PACKAGE_JSON

# update LICENSE:
cp $MONOREPO_LICENSE $LIB_LICENSE

# copy assets:
cp $IMAGES_PATH/$ICON $LIB_PATH
cp $IMAGES_PATH/$ICON $DEMO_PUBLIC_PATH
cp $IMAGES_PATH/$PREVIEW $LIB_PATH
cp $IMAGES_PATH/$PREVIEW $DEMO_PUBLIC_PATH

# change and copy README:
change_readme_version $VERSION $README
cp $README $LIB_PATH/$README

# change PKG files:
change_pkg_version productVersion $DEMO_PACKAGE_JSON
change_pkg_version version $LIB_PACKAGE_JSON

0 comments on commit 4279827

Please sign in to comment.