Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mallpopstar committed Aug 1, 2023
0 parents commit cfc7ecf
Show file tree
Hide file tree
Showing 33 changed files with 4,309 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: bump-version-and-tag

on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: checkout-code
uses: actions/checkout@v3

- name: setup-node
uses: actions/setup-node@v3
with:
node-version: 16

- name: automate-version-bump
uses: 'phips28/gh-action-bump-version@master'
with:
major-wording: '(major),breaking,breaks,break'
minor-wording: '(minor),feat,feature,features'
patch-wording: '(patch),fix,bugfix' # Providing patch-wording will override commits
# defaulting to a patch bump.
rc-wording: '(alpha),(rc)' # Providing rc-wording will override commits
# defaulting to a release candidate bump.
tag-prefix: 'v'

21 changes: 21 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: publish-package

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm run build
- uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
# dry-run: true
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Remote Control

A JavaScript library that allows you to perform actions from a remote location as if it were local.
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './dist/index'
121 changes: 121 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0" />
<title>Remote Control Library</title>

<style>
body {
font-family: sans-serif;
}

.btn {
display: inline-block;
padding: 0.5rem 1rem;
border: 1px solid #ccc;
border-radius: 0.25rem;
background-color: #fff;
cursor: pointer;
user-select: none;
}

.h-center {
display: flex;
justify-content: center;
align-items: center;
gap: 1rem;
}

.v-center {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 1rem;
}

.padding {
padding: 1rem;
}

input {
padding: 0.5rem 1rem;
border: 1px solid #ccc;
border-radius: 0.25rem;
background-color: #fff;
font-family: sans-serif;
font-weight: bold;
font-weight: 500;
}

input[type="submit"] {
cursor: pointer;
user-select: none;
background-color: #09750e;
color: white;
border: none;
font-weight: bold;
}

.border {
border: 1px solid #ccc;
}

.note {
font-size: 1.25rem;
color: red;
}
</style>

<script>
function increment() {
const el = document.querySelector("[name=counter]");
el.textContent = Number(el.textContent) + 1;
// el.value = Number(el.value) + 1 + ''
}
</script>
</head>
<body class="padding v-center">
<div id="app"></div>
<script
type="module"
src="/src/main.ts"></script>

<div class="h-center">
<img
src="https://www.tigerstrypes.com/wp-content/uploads/2016/07/Remote-Control-NES-Pic-1.jpg"
alt="Remote Control Logo" />
</div>
<div class="note">Open the developer console</div>
<div>This code can be found in <a href="src/main.ts">main.ts</a></div>
<form class="padding h-center">
<input
type="text"
id="first"
name="first"
placeholder="First name" />
<input
type="text"
id="last"
name="last"
placeholder="Last name" />
<input
type="submit"
value="Submit" />
</form>
<div class="padding h-center">
<a href="#1">Link 1</a>
<a href="#2">Link 2</a>
</div>
<div class="padding h-center border">
<button onclick="increment()">Increment</button>
<div name="counter">0</div>
<input
type="text"
name="text" placeholder="Type anything" />
</div>
</body>
</html>
Loading

0 comments on commit cfc7ecf

Please sign in to comment.