Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettCleary committed Aug 27, 2024
0 parents commit fc79951
Show file tree
Hide file tree
Showing 15 changed files with 2,785 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
i18next-parser.config.js
flatpak/build/
flatpak/.flatpak-builder/
vite.config.ts
**/__mocks__/**
sign/**
50 changes: 50 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module",
"project": ["./tsconfig.eslint.json"]
},
"plugins": ["@typescript-eslint", "import"],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "error",
"no-return-await": "off",
"@typescript-eslint/return-await": "warn",
"@typescript-eslint/promise-function-async": [
"error",
{
"allowedPromiseNames": ["Thenable"],
"checkArrowFunctions": true,
"checkFunctionDeclarations": true,
"checkFunctionExpressions": true,
"checkMethodDeclarations": true
}
],
"complexity": "off",
"eqeqeq": ["error", "always"],
"quotes": [
"error",
"single",
{ "avoidEscape": true, "allowTemplateLiterals": true }
],
"import/no-duplicates": ["error"]
}
}
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint and Prettier

on:
pull_request:
branches: [main, stable]
workflow_dispatch:

jobs:
lint_and_prettier_job:
uses: HyperPlay-Gaming/workflows/.github/workflows/nodejs_commands.yml@main
with:
node_version: '20'
pkg_manager: 'pnpm'
install: 'pnpm i'
name: 'lint'
command_one: 'pnpm lint'
command_one_name: 'Lint code.'
command_two: 'pnpm prettier'
command_two_name: 'Prettier code.'
checkout_recursive: false
secrets:
NPM_TOKEN: '${{ secrets.NPM_TOKEN }}'
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: Release to npm

on:
push:
paths:
- 'package.json'
branches:
- main

jobs:
release:
uses: HyperPlay-Gaming/workflows/.github/workflows/npm_publish.yml@main
with:
node_version: '20'
pkg_manager: 'pnpm'
pkg_manager_add_dev_dep: 'pnpm add -D'
install: 'pnpm i'
build: 'pnpm build'
publish: 'pnpm publish'
secrets:
NPM_TOKEN: '${{ secrets.NPM_TOKEN }}'
140 changes: 140 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# node.js single executable application
sea-prep.blob

#Hardhat files
cache
artifacts

#generated
typechain-types*
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
dist
build
coverage
public/locales/
flatpak
extensions/
doc
sign/
pnpm-lock.yaml
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "none",
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
© 2022 - 2024 HyperPlay Labs, Inc. - All Rights Reserved.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# HyperPlay Browser SDK

SDK for browser games integrating with HyperPlay's Browser Platform.
39 changes: 39 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "@hyperplay/browser-sdk",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"codecheck": "tsc --noEmit",
"prettier": "prettier --check .",
"prettier-fix": "prettier --write .",
"test": "hardhat compile && hardhat test",
"coverage": "nyc npm run test",
"build": "vite build",
"lint": "export ESLINT_USE_FLAT_CONFIG=false && eslint --ext .js,.jsx,.ts,.tsx,.json,.mdx ./src"
},
"files": [
"dist/*",
"LICENSE"
],
"exports": {
".": {
"import": "./dist/index.es.js",
"require": "./dist/index.cjs.js"
}
},
"types": "dist/index.d.ts",
"keywords": [],
"author": "",
"license": "UNLICENSED",
"devDependencies": {
"@types/node": "^22.5.0",
"eslint": "^9.9.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"prettier": "^3.3.3",
"typescript": "^5.5.4",
"vite": "^5.4.2",
"vite-plugin-dts": "^4.0.3"
}
}
Loading

0 comments on commit fc79951

Please sign in to comment.