Skip to content

Commit 2f50015

Browse files
committed
[ad2816] Set up initial project configuration
1 parent 6c30f34 commit 2f50015

12 files changed

+9178
-3
lines changed

.babelrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env"
4+
]
5+
}

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.eslintrc.json

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"parser": "babel-eslint",
3+
"extends": "standard",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"env": {
9+
"browser": true
10+
},
11+
"rules": {
12+
"no-cond-assign": ["error", "except-parens"],
13+
"no-duplicate-case": ["error"],
14+
15+
"accessor-pairs": "error",
16+
"curly": "error",
17+
"eqeqeq": ["error", "smart"],
18+
"no-alert": "error",
19+
"no-caller": "error",
20+
"no-console": ["error", {
21+
"allow": ["warn", "log"]
22+
}],
23+
"no-floating-decimal": "error",
24+
"no-invalid-this": "error",
25+
"no-multi-spaces": "error",
26+
"no-multi-str": "error",
27+
"no-new-func": "error",
28+
"no-new-wrappers": "error",
29+
"no-redeclare": "error",
30+
"no-self-assign": "error",
31+
"no-self-compare": "error",
32+
"yoda": ["error", "never"],
33+
34+
"block-spacing": ["error", "always"],
35+
"brace-style": ["error", "1tbs", {
36+
"allowSingleLine": true
37+
}],
38+
"camelcase": "error",
39+
"comma-dangle": ["error", "never"],
40+
"comma-style": ["error", "last"],
41+
"computed-property-spacing": ["error", "never"],
42+
"consistent-this": ["error", "_this"],
43+
"eol-last": ["error"],
44+
"func-call-spacing": ["error", "never"],
45+
"indent": ["error", 4, {
46+
"SwitchCase": 1
47+
}],
48+
"key-spacing": ["error", {
49+
"beforeColon": false,
50+
"afterColon": true
51+
}],
52+
"linebreak-style": ["off"],
53+
"lines-around-comment": ["error", {
54+
"beforeBlockComment": true,
55+
"afterBlockComment": false,
56+
"beforeLineComment": false,
57+
"afterLineComment": false,
58+
"allowBlockStart": true,
59+
"allowBlockEnd": false,
60+
"allowObjectStart": true,
61+
"allowArrayStart": true
62+
}],
63+
"space-before-function-paren": [0, {
64+
"anonymous": "always",
65+
"named": "always",
66+
"asyncArrow": "always"
67+
}],
68+
"new-parens": "error",
69+
"no-array-constructor": "error",
70+
"no-lonely-if": "error",
71+
"no-mixed-spaces-and-tabs": "error",
72+
"no-plusplus": "off",
73+
"no-trailing-spaces": ["error", {
74+
"skipBlankLines": true,
75+
"ignoreComments": true
76+
}],
77+
"no-underscore-dangle": "off",
78+
"no-whitespace-before-property": "error",
79+
"object-curly-newline": ["error", {
80+
"multiline": true,
81+
"minProperties": 1
82+
}],
83+
"one-var-declaration-per-line": ["error", "initializations"],
84+
"quote-props": ["error", "as-needed"],
85+
"quotes": ["error", "single"],
86+
"semi-spacing": ["error", {
87+
"before": false,
88+
"after": true
89+
}],
90+
"semi": ["error", "always"],
91+
"space-before-blocks": "error",
92+
"space-in-parens": ["error", "never"],
93+
"space-infix-ops": ["error", {
94+
"int32Hint": true
95+
}],
96+
"wrap-regex": "error",
97+
"spaced-comment": ["error", "always", {
98+
"block": {
99+
"balanced": true,
100+
"exceptions": ["*", "!"]
101+
}
102+
}]
103+
},
104+
"globals": {
105+
"Phaser": true
106+
},
107+
"settings": {
108+
"import/core-modules": ["phaser"]
109+
}
110+
}

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Changelog
2+
3+
#### 07/01/2019
4+
- Set up the initial project repo using

README.md

+53-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1-
# gamedev-2018-19
2-
ACTIVE: Repo for the gamedev Karma game
3-
Game Design Document: https://docs.google.com/document/d/1Ctt2m0ErAWTGdbF28D6xZCM1ODkzASjJUx4vugNpew8/edit?usp=sharing
1+
# Game Dev Karma Game
2+
#### Using Phaser 3 + ES6 + Webpack
3+
4+
ACTIVE: Repo for the gamedev Karma game Game Design Document: https://docs.google.com/document/d/1Ctt2m0ErAWTGdbF28D6xZCM1ODkzASjJUx4vugNpew8/edit?usp=sharing
5+
6+
The boiler plate code is based on the Bootstrap project https://github.com/nkholski/phaser3-es6-webpack which was based on the Boostrap project for Phaser 2 "Phaser + ES6 + Webpack" (https://github.com/lean/phaser-es6-webpack), https://github.com/belohlavek/phaser-es6-boilerplate and https://github.com/cstuncsik/phaser-es6-demo.
7+
8+
# Setup
9+
You’ll need to install a few things before you have a working copy of the project.
10+
11+
## 1. Clone this repo:
12+
13+
Navigate into your workspace directory.
14+
15+
Run:
16+
17+
```git clone .....```
18+
19+
## 2. Install node.js and npm:
20+
21+
https://nodejs.org/en/
22+
23+
24+
## 3. Install dependencies (optionally you could install [yarn](https://yarnpkg.com/)):
25+
26+
Navigate to the cloned repo’s directory.
27+
28+
Run:
29+
30+
```npm install```
31+
32+
or if you choose yarn, just run ```yarn```
33+
34+
## 4. Run the development server:
35+
36+
Run:
37+
38+
```npm run dev```
39+
40+
This will run a server so you can run the game in a browser.
41+
42+
Open your browser and enter localhost:3000 into the address bar.
43+
44+
Also this will start a watch process, so you can change the source and the process will recompile and refresh the browser.
45+
46+
47+
## Build for deployment:
48+
49+
Run:
50+
51+
```npm run deploy```
52+
53+
This will optimize and minimize the compiled bundle.

index.html

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>Karma GameDev </title>
7+
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
8+
<meta name="HandheldFriendly" content="True">
9+
<meta name="MobileOptimized" content="320">
10+
<meta http-equiv="cleartype" content="on">
11+
<meta name="format-detection" content="telephone=no">
12+
<style>
13+
html,
14+
body {
15+
margin: 0;
16+
padding: 0;
17+
image-rendering: optimizeSpeed; /* Older versions of FF */
18+
image-rendering: -moz-crisp-edges; /* FF 6.0+ */
19+
image-rendering: -webkit-optimize-contrast; /* Webkit (non standard naming) */
20+
image-rendering: -o-crisp-edges; /* OS X & Windows Opera (12.02+) */
21+
image-rendering: crisp-edges; /* Possible future browsers. */
22+
-ms-interpolation-mode: nearest-neighbor; /* IE (non standard naming) */
23+
image-rendering: pixelated; /* Chrome 41 */
24+
}
25+
</style>
26+
</head>
27+
28+
<body style="background-color: black;">
29+
<div style="text-align: center">
30+
<span style="color: white;">Karma GameDev </span> |
31+
<a href="javascript:toggleTouch()">Show/hide touch controls</a> |
32+
<div id="content" style="display: block; width: 100%; text-align: center"></div>
33+
34+
<script type="text/javascript" src="./dev/vendor.js"></script><script type="text/javascript" src="./dev/app.js"></script></div></body>
35+
</html>

0 commit comments

Comments
 (0)