Skip to content

Commit 9d2d15b

Browse files
committed
Make cube much nicer & rotating.
1 parent 51c2b61 commit 9d2d15b

File tree

11 files changed

+705
-416
lines changed

11 files changed

+705
-416
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/rubiks.wasm
2+
src/rubiks.js

.eslintrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
7+
"parserOptions": {
8+
"ecmaVersion": 12,
9+
"sourceType": "module"
10+
},
11+
"rules": {
12+
"prettier/prettier": "error"
13+
}
14+
}

.github/workflows/deploy.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ jobs:
77
build-and-deploy:
88
runs-on: ubuntu-latest
99
steps:
10-
- name: Checkout 🛎️
10+
- name: Checkout
1111
uses: actions/checkout@v2.3.1
1212
with:
1313
persist-credentials: false
1414

15-
- name: Install and Build 🔧
15+
- name: Install and Build
1616
run: |
1717
yarn --silent
18+
yarn lint
1819
yarn build
1920
20-
- name: Deploy 🚀
21+
- name: Deploy
2122
uses: JamesIves/github-pages-deploy-action@3.7.1
2223
with:
2324
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 4,
4+
"semi": false,
5+
"singleQuote": true
6+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Tibor Djurica Potpara
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## rubiks
2+
3+
Rubiks is a simple Rubik's cube simulator with an included LBL solver.

cubedraw.c

Lines changed: 0 additions & 294 deletions
This file was deleted.

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
{
22
"name": "rubiks",
3+
"license": "MIT",
4+
"private": true,
5+
"version": "0.0.1",
36
"scripts": {
47
"build:bundle": "webpack",
58
"build:wasm": "docker run --rm -v $(pwd):/src emscripten/emsdk emcc -O3 -s WASM=1 -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"cwrap\"]' -s ALLOW_MEMORY_GROWTH=1 -s ENVIRONMENT=web -s MODULARIZE=1 -s 'EXPORT_NAME=\"rubiks\"' -o ./src/rubiks.js ./src/rubiks.c",
69
"build": "npm run build:wasm && npm run build:bundle",
10+
"lint": "eslint src/",
11+
"lint:fix": "eslint --fix src/",
712
"dev": "webpack serve"
813
},
914
"devDependencies": {
1015
"clean-webpack-plugin": "^3.0.0",
1116
"css-loader": "^5.0.0",
17+
"eslint": "^7.12.0",
18+
"eslint-config-prettier": "^6.14.0",
19+
"eslint-plugin-prettier": "^3.1.4",
1220
"file-loader": "^6.1.1",
1321
"html-webpack-plugin": "^4.5.0",
22+
"prettier": "^2.1.2",
1423
"style-loader": "^2.0.0",
1524
"webpack": "^5.2.0",
1625
"webpack-cli": "^4.1.0",

0 commit comments

Comments
 (0)