chore: prepare for npm publishing as @gkucmierz/bitcoin-logo
This commit is contained in:
22
.gitea/workflows/npm-publish.yaml
Normal file
22
.gitea/workflows/npm-publish.yaml
Normal 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
21
LICENSE
Normal 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.
|
||||
53
README.md
53
README.md
@@ -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.
|
||||

|
||||

|
||||
|
||||
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
|
||||
|
||||
24
package.json
24
package.json
@@ -1,21 +1,33 @@
|
||||
{
|
||||
"name": "bitcoin-logo",
|
||||
"private": true,
|
||||
"name": "@gkucmierz/bitcoin-logo",
|
||||
"version": "1.0.0",
|
||||
"description": "Premium 3D SVG rotating Bitcoin logo",
|
||||
"author": "Grzegorz Kucmierz",
|
||||
"license": "MIT",
|
||||
"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": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.5.25"
|
||||
"peerDependencies": {
|
||||
"vue": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^6.0.2",
|
||||
"vite": "^7.3.1"
|
||||
"vite": "^7.3.1",
|
||||
"vue": "^3.5.25"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
4
src/index.js
Normal file
4
src/index.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import BitcoinLogo from './components/BitcoinLogo.vue'
|
||||
|
||||
export { BitcoinLogo }
|
||||
export default BitcoinLogo
|
||||
@@ -1,8 +1,24 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { resolve } from 'path'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
build: {
|
||||
lib: {
|
||||
entry: resolve(__dirname, 'src/index.js'),
|
||||
name: 'BitcoinLogo',
|
||||
fileName: 'bitcoin-logo',
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ['vue'],
|
||||
output: {
|
||||
globals: {
|
||||
vue: 'Vue',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
server: {
|
||||
host: true,
|
||||
allowedHosts: true,
|
||||
|
||||
Reference in New Issue
Block a user