Compare commits

..

7 Commits

Author SHA1 Message Date
fdee807dda chore: simplify npm-publish workflow
All checks were successful
Deploy to Production / deploy (push) Successful in 4s
2026-03-03 09:56:41 +00:00
0041f18eab diag: add npm whoami to troubleshoot authentication
All checks were successful
Deploy to Production / deploy (push) Successful in 5s
2026-03-03 09:45:39 +00:00
60490cd2a1 fix: use local .npmrc and add token presence check
All checks were successful
Deploy to Production / deploy (push) Successful in 4s
2026-03-03 09:42:25 +00:00
9aa9edf87f fix: manual npmrc configuration to resolve auth issues in workflow
All checks were successful
Deploy to Production / deploy (push) Successful in 5s
2026-03-03 09:37:55 +00:00
e3a3875949 chore: ignore dist-app and remove it from tracking
All checks were successful
Deploy to Production / deploy (push) Successful in 8s
2026-03-03 09:27:18 +00:00
5e70b417db chore: split build into library and app modes for Docker and npm compatibility 2026-03-03 09:25:51 +00:00
5e4fa25fc4 chore: prepare for npm publishing as @gkucmierz/bitcoin-logo 2026-03-03 09:24:00 +00:00
9 changed files with 159 additions and 11 deletions

View File

@@ -0,0 +1,26 @@
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
- name: Publish to npm
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

1
.gitignore vendored
View File

@@ -9,6 +9,7 @@ lerna-debug.log*
node_modules
dist
dist-app
dist-ssr
*.local

View File

@@ -12,7 +12,7 @@ RUN npm run build
# Stage 2: Serve the application with Nginx
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY --from=build-stage /app/dist-app /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80

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,35 @@
{
"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",
"build": "npm run build:lib && npm run build:app",
"build:lib": "vite build",
"build:app": "vite build --config vite.config.app.js",
"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
View File

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

19
vite.config.app.js Normal file
View File

@@ -0,0 +1,19 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
export default defineConfig({
plugins: [vue()],
build: {
outDir: 'dist-app'
},
server: {
host: true,
allowedHosts: true,
headers: {
'Cache-Control': 'no-store, no-cache, must-revalidate, proxy-revalidate',
'Pragma': 'no-cache',
'Expires': '0',
}
}
})

View File

@@ -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,