Skip to content

Commit

Permalink
Basic Project Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Feb 2, 2023
0 parents commit 848b1c1
Show file tree
Hide file tree
Showing 15 changed files with 289 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2021
},
"extends": [
"plugin:lvksh/recommended"
],
"ignorePatterns": ["!**/*"],
"plugins": ["lvksh"],
"env": {
"node": true,
"jest/globals": true
},
"rules": {}
}
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: "[Bug]"
labels: bug
assignees: robiot

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment**
- Node: [e.g. v16.9.1]
- OS: [e.g. Arch Linux]
- Typescript [e.g. v.5.4.5]
- Version [e.g. v1.0.0]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest improvements
title: "[Feature]"
labels: enhancement
assignees: robiot

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
36 changes: 36 additions & 0 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PR Build
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Lint
run: pnpm lint
- name: Build
run: pnpm build
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Node.js Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build

- name: Version
run: pnpm version --new-version "${GITHUB_REF:11}" --allow-same-version --no-git-tag-version

- run: pnpm pub --tag next
# if github release tag contains - then its a prerelease
if: ${{ contains(github.ref, '-') }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: pnpm pub
# if github release tag doesn't contains - then its a normal release
if: ${{ !contains(github.ref, '-') }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/coverage
/lib
/logs
/node_modules
/yarn-error.log
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
yarn-error.log
/lib
coverage
LICENSE
README.md
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"tabWidth": 4,
"useTabs": false,
"singleQuote": true
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"files.exclude": {
"yarn.lock": true,
"yarn-error.log": true,
"node_modules": true,
"coverage": true
}
}
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
node-fullykiosk - a typescript wrapper and react hooks for the Fully Kiosk API
Copyright (C) 2023 Luc van Kampen

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU Lesser General Public License at <https://www.gnu.org/licenses/lgpl-3.0>
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
![node fullykiosk](./assets/banner.png)

[![MINIFIED SIZE](https://img.shields.io/bundlephobia/min/fullykiosk.svg)]()
[![COVERAGE](https://img.shields.io/badge/coverage-100%25-brightgreen.svg)]()
[![LANGUAGES](https://img.shields.io/github/languages/top/v3xlabs/fullykiosk)]()
[![DEPENDENCIRES](https://img.shields.io/badge/dependencies-0-brightgreen.svg)]()
[![NPM](https://img.shields.io/npm/dt/fullykiosk)]()

Typescript Friendly React Hooks for the Fully Kiosk Browser App

This library exposes multiple react hooks that you can use to interface with your Fully Kiosk Browser App. By default the fully kiosk API is globally injected into the window object, so you could use it directly. However, this library provides a more typescript friendly interface.

## How it works

## Installation

Using `npm`:

```sh
npm install fullykiosk
```

or if you prefer to use the `yarn` package manager:

```sh
yarn add fullykiosk
```

## Usage

```ts

```

## Contributors

[![](https://contrib.rocks/image?repo=v3xlabs/node-fullykiosk)](https://github.com/v3xlabs/node-fullykiosk/graphs/contributors)

## LICENSE

This package is licensed under the [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl-3.0).
38 changes: 38 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "fullykiosk",
"description": "Typescript friendly React Hooks for the Fully Kiosk API",
"repository": "https://github.com/v3xlabs/node-fullykiosk",
"author": "v3xlabs",
"license": "LGPL-3.0",
"types": "./lib/index.d.ts",
"main": "./lib/index.js",
"files": [
"lib"
],
"keywords": [
"fullykiosk",
"fully",
"kiosk",
"react",
"hooks",
"typescript"
],
"devDependencies": {
"@types/jest": "^28.1.3",
"@types/node": "^18.0.0",
"@jest/types": "^28.1.1",
"@typescript-eslint/parser": "^5.29.0",
"eslint": "^8.18.0",
"eslint-plugin-lvksh": "^1.4.1",
"jest": "^28.1.1",
"ts-jest": "^28.0.5",
"ts-node": "^10.8.1",
"typescript": "^4.7.4"
},
"scripts": {
"build": "tsc",
"test": "jest --verbose --coverage",
"lint": "eslint -c .eslintrc.json --ext .ts ./src ./tests",
"pub": "pnpm publish --no-git-checks"
}
}
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const useCurrentLocale = () => {

};
17 changes: 17 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"compilerOptions": {
"moduleResolution": "node",
"target": "ES5",
"module": "commonjs",
"lib": ["es2015", "es2016", "es2017", "es2020"],
"strict": true,
"declaration": true,
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"outDir": "lib",
"esModuleInterop": true
},
"include": ["src"],
"exclude": ["node_modules", "tests", "lib"]
}

0 comments on commit 848b1c1

Please sign in to comment.