chore: prepare for npm publishing as @gkucmierz/bitcoin-logo

This commit is contained in:
2026-03-03 09:24:00 +00:00
parent 2b6e9077c7
commit 5e4fa25fc4
6 changed files with 131 additions and 9 deletions

View File

@@ -0,0 +1,22 @@
name: npm-publish
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
publish:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Grzegorz Kucmierz
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 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.

View File

@@ -1,5 +1,52 @@
# Vue 3 + Vite # @gkucmierz/bitcoin-logo
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more. ![NPM Version](https://img.shields.io/npm/v/@gkucmierz/bitcoin-logo)
![License](https://img.shields.io/npm/l/@gkucmierz/bitcoin-logo)
Learn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support). A premium, customizable, and interactive 3D-style Bitcoin logo component for Vue 3.
## 🚀 Features
- **Interactive 3D Rotation**: Tilt and rotate the logo with mouse or touch.
- **Inertia & Momentum**: Smooth rotation that continues after release.
- **Customizable**: Control size, colors, and animation speed via props.
- **Premium Aesthetics**: Clean SVG-based design with subtle gradients and shadows.
## 📦 Installation
```bash
npm install @gkucmierz/bitcoin-logo
```
## 🛠 Usage
```vue
<script setup>
import { BitcoinLogo } from '@gkucmierz/bitcoin-logo'
import '@gkucmierz/bitcoin-logo/style.css'
</script>
<template>
<BitcoinLogo
:size="256"
symbolColor="#f7931a"
:inertia="true"
/>
</template>
```
### Props
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `Number` | `256` | The width and height of the logo in pixels. |
| `symbolColor` | `String` | `'#f7931a'` | The color of the Bitcoin symbol. |
| `autoRotate` | `Boolean` | `true` | Whether the logo should rotate automatically. |
| `rotationDuration` | `Number` | `10` | Duration of one full rotation in seconds. |
| `inertia` | `Boolean` | `true` | Enable inertia during manual interaction. |
---
## 📄 License
MIT

View File

@@ -1,21 +1,33 @@
{ {
"name": "bitcoin-logo", "name": "@gkucmierz/bitcoin-logo",
"private": true,
"version": "1.0.0", "version": "1.0.0",
"description": "Premium 3D SVG rotating Bitcoin logo", "description": "Premium 3D SVG rotating Bitcoin logo",
"author": "Grzegorz Kucmierz", "author": "Grzegorz Kucmierz",
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
"main": "./dist/bitcoin-logo.umd.cjs",
"module": "./dist/bitcoin-logo.js",
"exports": {
".": {
"import": "./dist/bitcoin-logo.js",
"require": "./dist/bitcoin-logo.umd.cjs"
},
"./style.css": "./dist/bitcoin-logo.css"
},
"files": [
"dist"
],
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "peerDependencies": {
"vue": "^3.5.25" "vue": "^3.0.0"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^6.0.2", "@vitejs/plugin-vue": "^6.0.2",
"vite": "^7.3.1" "vite": "^7.3.1",
"vue": "^3.5.25"
} }
} }

4
src/index.js Normal file
View File

@@ -0,0 +1,4 @@
import BitcoinLogo from './components/BitcoinLogo.vue'
export { BitcoinLogo }
export default BitcoinLogo

View File

@@ -1,8 +1,24 @@
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
export default defineConfig({ export default defineConfig({
plugins: [vue()], plugins: [vue()],
build: {
lib: {
entry: resolve(__dirname, 'src/index.js'),
name: 'BitcoinLogo',
fileName: 'bitcoin-logo',
},
rollupOptions: {
external: ['vue'],
output: {
globals: {
vue: 'Vue',
},
},
},
},
server: { server: {
host: true, host: true,
allowedHosts: true, allowedHosts: true,