Skip to content

Commit

Permalink
simple color wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
jogibear9988 committed May 19, 2024
1 parent 00962fa commit cc5d665
Show file tree
Hide file tree
Showing 15 changed files with 7,726 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build 🔧
run: npm ci && npm run build
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish to NPM
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build 🔧
run: npm ci && npm run build
- name: Publish package on NPM 📦
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
node_modules/
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
src/
sample/
node_modules/
tsconfig.json
.github/
11 changes: 11 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true
},
"npm": {
"publish": false
}
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"window.title": "${dirty}${activeEditorShort}${separator}${rootName}${separator}${profileName}${separator}${appName}${separator}[Branch: main]"
}
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# tab.webcomponent

[![Published on npm](https://img.shields.io/npm/v/@node-projects/color-wheel.webcomponent.svg?logo=npm)](https://www.npmjs.com/package/@node-projects/color-wheel.webcomponent)

# description
a simple tab control as webcomponent..

usable in web-component-designer: [https://node-projects.github.io/web-component-designer-demo/index.html](https://node-projects.github.io/web-component-designer-demo/index.html?npm=@node-projects/tab.webcomponent&html=%3Cnode-projects-tab%20style=%22width:326px;height:257px;position:absolute;left:177px;top:79px;%22%3E%20%3Cdiv%3E%20%3Cbutton%20style=%22width:80px;height:30px;position:absolute;left:119px;top:68px;%22%3EButton%3C/button%3E%20%3C/div%3E%20%3Cdiv%3E%20Hello%20%3C/div%3E%20%3C/node-projects-tab%3E)

# development
## upload new version
simple run

npm run release

then you need to go to github and create a release from the uploaded tag.
this will then create a npm package via github action.
56 changes: 56 additions & 0 deletions custom-elements.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"schemaVersion": "1.0.0",
"readme": "README.md",
"modules": [
{
"kind": "javascript-module",
"path": "dist/ColorWheel.js",
"declarations": [
{
"kind": "class",
"description": "a color wheel",
"name": "ColorWheel",
"members": [
{
"kind": "field",
"name": "value",
"type": {
"text": "string"
}
}
],
"attributes": [
{
"name": "value",
"fieldName": "value"
}
],
"events": [
{
"name": "value-changed",
"description": "raised when the value changes",
"type": {
"title": "string"
}
}
],
"superclass": {
"name": "BaseCustomWebComponentConstructorAppend"
},
"tagName": "node-projects-color-wheel",
"customElement": true
}
],
"exports": [
{
"kind": "custom-element-definition",
"name": "node-projects-color-wheel",
"declaration": {
"name": "ColorWheel",
"module": "dist/ColorWheel.js"
}
}
]
}
]
}
Loading

0 comments on commit cc5d665

Please sign in to comment.