Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update readme for PineCone Gallery #3

Merged
merged 15 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<!-- # Copy Image Size -->

<h2 align="center"><img src="./icon.png" height="128" /><br />Copy Image Size</h2>
<h2 align="center">
<img src="./icon.png" height="128" />
<br />
<span>Copy Image Size</span>
</h2>
<p align="center"><strong>⚡️📋 Copy Image Size for Tailwindcss or Unocss or CSS
</strong></p>
<p align=center>
Expand All @@ -13,6 +17,26 @@
<img src="https://files.catbox.moe/nqvcb8.png" />
</p>

## Usege ⚡️
## Base Usege ⚡️

Right-click VSCode image file, Copy Image Size and translate to (Tailwind/Unocss) Utility or CSS Properties
Right-click VSCode image file, Open PineCone Gallery or translate Image Size to (Tailwind/Unocss) Utility or CSS Properties

## PineCone Gallery

`PineCone Gallery` is a Image Gallery for vscode. Right-click the directory includes image files to create PineCone Gallery icon in activity bar.

We recommend moving the PineCone Gallery icon to `Secondary Side Bar` for more convenient use.

**How to use?**

Right-click directory includes image files, select `Open PineCone Gallery`

![Open PineCone Gallery](https://files.catbox.moe/c9gqqi.png)

Select the `PineCone Gallery Icon` in `Activity Bar`

![PineCone Gallery Icon](https://files.catbox.moe/xrfdld.png)

Right-click the image item to copy size or copy name or everything else.

![dd](https://files.catbox.moe/o1opql.png)
4 changes: 4 additions & 0 deletions media/i-pine-cone.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions media/ion--images.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
103 changes: 85 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "copy-image-size",
"displayName": "Copy Image Size",
"type": "module",
"version": "0.1.1",
"version": "0.2.0",
"private": false,
"packageManager": "pnpm@9.8.0",
"description": "Copy Image Size for Tailwind or Unocss or CSS",
Expand Down Expand Up @@ -40,7 +40,42 @@
"onStartupFinished"
],
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "pinecone",
"title": "PineCone Gallery",
"icon": "media/i-pine-cone.svg"
}
]
},
"views": {
"pinecone": [
{
"id": "1_pineconeViews",
"name": "",
"type": "webview",
"when": "copy-image-size.showPineConeGalleryIcon"
}
]
},
"commands": [
{
"command": "copy-image-size.openPineCone",
"title": "Open PineCone Gallery"
},
{
"command": "copy-image-size.openWithTextEditor",
"title": "Open"
},
{
"command": "copy-image-size.locateImage",
"title": "Location"
},
{
"command": "copy-image-size.openExplorerWithImage",
"title": "Explorer"
},
{
"command": "copy-image-size.copyImageSizeToTailwind",
"title": "Copy Image Size to Tailwindcss"
Expand All @@ -50,16 +85,21 @@
"title": "Copy Image Size to CSS"
},
{
"command": "copy-image-size.copyImageFullname",
"title": "Copy Image Fullname"
"command": "copy-image-size.copyImageBasename",
"title": "Copy Basename"
},
{
"command": "copy-image-size.copyImageExt",
"title": "Copy Image Ext"
"command": "copy-image-size.copyImageExtname",
"title": "Copy Extname"
}
],
"menus": {
"explorer/context": [
{
"command": "copy-image-size.openPineCone",
"group": "copy-image-size.pinecone@01",
"when": "explorerResourceIsFolder"
},
{
"command": "copy-image-size.copyImageSizeToTailwind",
"when": "resourceExtname == .jpg || resourceExtname == .jpeg || resourceExtname == .png || resourceExtname == .gif || resourceExtname == .bmp || resourceExtname == .svg || resourceExtname == .webp || resourceExtname == .tiff",
Expand All @@ -69,16 +109,43 @@
"command": "copy-image-size.copyImageSizeToCss",
"when": "resourceExtname == .jpg || resourceExtname == .jpeg || resourceExtname == .png || resourceExtname == .gif || resourceExtname == .bmp || resourceExtname == .svg || resourceExtname == .webp || resourceExtname == .tiff",
"group": "copy-image-size@02"
}
],
"webview/context": [
{
"command": "copy-image-size.openWithTextEditor",
"when": "webviewId == '1_pineconeViews' && webviewSection == 'imgItem'",
"group": "1_commands@1"
},
{
"command": "copy-image-size.copyImageFullname",
"when": "resourceExtname == .jpg || resourceExtname == .jpeg || resourceExtname == .png || resourceExtname == .gif || resourceExtname == .bmp || resourceExtname == .svg || resourceExtname == .webp || resourceExtname == .tiff",
"group": "copy-image-size@10"
"command": "copy-image-size.locateImage",
"when": "webviewId == '1_pineconeViews' && webviewSection == 'imgItem'",
"group": "1_commands@2"
},
{
"command": "copy-image-size.copyImageExt",
"when": "resourceExtname == .jpg || resourceExtname == .jpeg || resourceExtname == .png || resourceExtname == .gif || resourceExtname == .bmp || resourceExtname == .svg || resourceExtname == .webp || resourceExtname == .tiff",
"group": "copy-image-size@20"
"command": "copy-image-size.openExplorerWithImage",
"when": "webviewId == '1_pineconeViews' && webviewSection == 'imgItem'",
"group": "1_commands@3"
},
{
"command": "copy-image-size.copyImageSizeToTailwind",
"when": "webviewId == '1_pineconeViews' && webviewSection == 'imgItem'",
"group": "z_copy@1"
},
{
"command": "copy-image-size.copyImageSizeToCss",
"when": "webviewId == '1_pineconeViews' && webviewSection == 'imgItem'",
"group": "z_copy@2"
},
{
"command": "copy-image-size.copyImageBasename",
"when": "webviewId == '1_pineconeViews' && webviewSection == 'imgItem'",
"group": "z_copy@3"
},
{
"command": "copy-image-size.copyImageExtname",
"when": "webviewId == '1_pineconeViews' && webviewSection == 'imgItem'",
"group": "z_copy@4"
}
]
}
Expand All @@ -100,17 +167,17 @@
"@types/node": "^18.19.45",
"@types/vscode": "^1.82.0",
"await-to-js": "^3.0.0",
"bumpp": "^9.5.2",
"bumpp": "^9.6.1",
"clipboardy": "^4.0.0",
"eslint-plugin-format": "^0.1.2",
"image-size": "^1.1.1",
"jest-mock-vscode": "^4.0.1",
"jest-mock-vscode": "^4.0.2",
"lint-staged": "^15.2.10",
"reactive-vscode": "^0.2.2",
"reactive-vscode": "^0.2.5",
"simple-git-hooks": "^2.11.1",
"tsup": "^8.2.4",
"typescript": "^5.5.4",
"vitest": "^2.0.5",
"tsup": "^8.3.0",
"typescript": "^5.6.2",
"vitest": "^2.1.1",
"vscode-uri": "^3.0.8"
},
"simple-git-hooks": {
Expand All @@ -119,4 +186,4 @@
"lint-staged": {
"*": "eslint --fix"
}
}
}
Loading