Skip to content

Commit

Permalink
Merge pull request #42 from eugene-serb/dev
Browse files Browse the repository at this point in the history
Release 1.4.0
  • Loading branch information
eugene-serb authored Jun 12, 2023
2 parents fa0f1e4 + e062e70 commit 6e5465a
Show file tree
Hide file tree
Showing 55 changed files with 1,910 additions and 1,443 deletions.
18 changes: 7 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
'use strict';
'use strict';

module.exports = {
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
root: true,
env: {
es2022: true,
browser: true,
node: true,
},
extends: [
'eslint:recommended',
],
rules: {
'no-unused-vars': 'warn',
extends: ['eslint:recommended', 'prettier'],
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
};
51 changes: 51 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Define the line ending behavior of the different file extensions
# Set default behavior, in case users don't have core.autocrlf set.
* text=auto
* text eol=lf

# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.default text
*.md text
*.po text
*.js text
*.css text
*.scss text
*.ini text
*.properties text
*.txt text
*.xml text
*.svg text
*.yml text
.htaccess text

# Declare files that will always have CRLF line endings on checkout.
*.bat eol=crlf

# Declare files that will always have LF line endings on checkout.
*.pem eol=lf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.gif binary
*.webp binary
*.ico binary
*.mo binary
*.pdf binary
*.phar binary
*.woff binary
*.woff2 binary
*.ttf binary
*.otf binary
*.eot binary
*.gz binary
*.bz2 binary
*.7z binary
*.zip binary
*.webm binary
*.mp4 binary
*.ogv binary
*.xls binary
*.xlsx binary
*.ods binary
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: eugene-serb
github: eugene-serb
18 changes: 10 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

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

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''

---


1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
30 changes: 14 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
name: Build
name: Build

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- development
- master
- dev
workflow_dispatch:

jobs:
build:

strategy:
matrix:
node-version: [ 18.x ]
os: [ ubuntu-latest ]
node-version: [18]
os: [ubuntu-22.04]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run build

- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run build
30 changes: 14 additions & 16 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
name: Lint
name: Lint

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- development
- master
- dev
workflow_dispatch:

jobs:
lint:

strategy:
matrix:
node-version: [ 18.x ]
os: [ ubuntu-latest ]
node-version: [18]
os: [ubuntu-22.04]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run lint

- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run lint
30 changes: 14 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
name: Test
name: Test

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- development
- master
- dev
workflow_dispatch:

jobs:
test:

strategy:
matrix:
node-version: [ 18.x ]
os: [ ubuntu-latest ]
node-version: [18]
os: [ubuntu-22.04]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run test

- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run test
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Ignore artifacts:

**/.git
**/.svn
**/.hg
**/node_modules
.vs
.github
docs
13 changes: 13 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
printWidth: 100,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
quoteProps: 'as-needed',
trailingComma: 'all',
arrowParens: 'always',
bracketSameLine: false,
bracketSpacing: true,
htmlWhitespaceSensitivity: 'strict',
};
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
# Snake Game
This is a simple browser snake-game. Let's have fun! **[[rep](https://github.com/eugene-serb/snake-game/), [site](https://eugene-serb.github.io/snake-game/)]**

This is a simple browser snake-game in JavaScript, HTML, CSS, BEM and OOP, and also, Webpack, Babel, ESLint. Keyboard, gamepad and touchscreen are supported. Contains dark and light themes.
This is a simple browser snake-game. Let's have fun! **[[rep](https://github.com/eugene-serb/snake-game/)]** **[[site](https://eugene-serb.github.io/snake-game/)]**.

If you are interested in this or my other projects, or would like to suggest and share ideas with me, or just talk to me, contact me: *[@eugene_serb](https://t.me/eugene_serb)*
Use Aurora Game Engine **[[rep](https://github.com/eugene-serb/aurora-game-engine)]**.

## Stack:

![](https://img.shields.io/badge/HTML-informational?style=flat-square&logo=html5&logoColor=FFFFFF&color=E44D26)
![](https://img.shields.io/badge/CSS-informational?style=flat-square&logo=css3&logoColor=FFFFFF&color=25A1E1)
![](https://img.shields.io/badge/JSON-informational?style=flat-square&logo=json&logoColor=323330&color=FAF0E6)
![](https://img.shields.io/badge/YAML-informational?style=flat-square&logo=yaml&logoColor=FFFFFF&color=FF0000)
![](https://img.shields.io/badge/JavaScript-informational?style=flat-square&logo=javascript&logoColor=323330&color=F0DB4F)
![](https://img.shields.io/badge/Node.JS-informational?style=flat-square&logo=node.js&logoColor=FFFFFF&color=3C873A)
![](https://img.shields.io/badge/Webpack-informational?style=flat-square&logo=webpack&logoColor=62B1D8&color=2B3A42)
![](https://img.shields.io/badge/Babel-informational?style=flat-square&logo=babel&logoColor=323330&color=F5DA55)
![](https://img.shields.io/badge/ESLint-informational?style=flat-square&logo=eslint&logoColor=FFFFFF&color=8181F2)
![](https://img.shields.io/badge/Prettier-informational?style=flat-square&logo=prettier&logoColor=FFFFFF&color=1A2B34)
![](https://img.shields.io/badge/Jest-informational?style=flat-square&logo=jest&logoColor=FFFFFF&color=15C213)
![](https://img.shields.io/badge/📝-JSDoc-informational?style=flat-square&logo=jsdoc&logoColor=FFFFFF&color=006FBB&labelColor=006FBB)
![](https://img.shields.io/badge/npm-informational?style=flat-square&logo=npm&logoColor=FFFFFF&color=CB0000)
![](https://img.shields.io/badge/Git-informational?style=flat-square&logo=git&logoColor=FFFFFF&color=BC4420)
![](https://img.shields.io/badge/GitHub-informational?style=flat-square&logo=github&logoColor=FFFFFF&color=24292F)
![](https://img.shields.io/badge/GitHub%20Actions-informational?style=flat-square&logo=github&logoColor=FFFFFF&color=24292F)

## Commands:

- npm run start — run with watcher
- npm run serve — run dev server
- npm run build — build in production mode,
- npm run build:dev — build in development mode,
- npm run lint — run lint check,
- npm run lint:fix — run lint fix,
- npm run format — run prettier check,
- npm run format:fix — run prettier fix,
- npm run test — run tests
6 changes: 2 additions & 4 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';
'use strict';

module.exports = {
presets: [
'@babel/preset-env',
],
presets: ['@babel/preset-env'],
};
2 changes: 1 addition & 1 deletion docs/404.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html lang="en-us" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<html lang="en-us" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Expand Down
Loading

0 comments on commit 6e5465a

Please sign in to comment.