Skip to content
This repository was archived by the owner on Dec 16, 2021. It is now read-only.

Commit 858a13c

Browse files
committed
chore: add misc files
1 parent 31c5db2 commit 858a13c

14 files changed

+376
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.eslintrc.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
root: true
3+
parser: babel-eslint
4+
extends:
5+
- eslint:recommended
6+
- plugin:prettier/recommended
7+
env:
8+
es6: true
9+
browser: true
10+
rules:
11+
semi: off

.gitattributes

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
## GITATTRIBUTES FOR WEB PROJECTS
2+
#
3+
# https://github.com/alexkaratarakis/gitattributes
4+
#
5+
# These settings are for any web project.
6+
#
7+
# Details per file setting:
8+
# text These files should be normalized (i.e. convert CRLF to LF).
9+
# binary These files are binary and should be left untouched.
10+
#
11+
# Note that binary is a macro for -text -diff.
12+
######################################################################
13+
14+
## AUTO-DETECT
15+
## Handle line endings automatically for files detected as
16+
## text and leave all files detected as binary untouched.
17+
## This will handle all files NOT defined below.
18+
* text=auto
19+
20+
## SOURCE CODE
21+
*.bat text eol=crlf
22+
*.coffee text
23+
*.css text
24+
*.htm text
25+
*.html text
26+
*.inc text
27+
*.ini text
28+
*.js text
29+
*.json text
30+
*.jsx text
31+
*.less text
32+
*.od text
33+
*.onlydata text
34+
*.php text
35+
*.pl text
36+
*.py text
37+
*.rb text
38+
*.sass text
39+
*.scm text
40+
*.scss text
41+
*.sh text eol=lf
42+
*.sql text
43+
*.styl text
44+
*.tag text
45+
*.ts text
46+
*.tsx text
47+
*.xml text
48+
*.xhtml text
49+
50+
## DOCKER
51+
*.dockerignore text
52+
Dockerfile text
53+
54+
## DOCUMENTATION
55+
*.markdown text
56+
*.md text
57+
*.mdwn text
58+
*.mdown text
59+
*.mkd text
60+
*.mkdn text
61+
*.mdtxt text
62+
*.mdtext text
63+
*.txt text
64+
AUTHORS text
65+
CHANGELOG text
66+
CHANGES text
67+
CONTRIBUTING text
68+
COPYING text
69+
copyright text
70+
*COPYRIGHT* text
71+
INSTALL text
72+
license text
73+
LICENSE text
74+
NEWS text
75+
readme text
76+
*README* text
77+
TODO text
78+
79+
## TEMPLATES
80+
*.dot text
81+
*.ejs text
82+
*.haml text
83+
*.handlebars text
84+
*.hbs text
85+
*.hbt text
86+
*.jade text
87+
*.latte text
88+
*.mustache text
89+
*.njk text
90+
*.phtml text
91+
*.tmpl text
92+
*.tpl text
93+
*.twig text
94+
95+
## LINTERS
96+
.csslintrc text
97+
.eslintrc text
98+
.htmlhintrc text
99+
.jscsrc text
100+
.jshintrc text
101+
.jshintignore text
102+
.stylelintrc text
103+
104+
## CONFIGS
105+
*.bowerrc text
106+
*.cnf text
107+
*.conf text
108+
*.config text
109+
.browserslistrc text
110+
.editorconfig text
111+
.gitattributes text
112+
.gitconfig text
113+
.htaccess text
114+
*.npmignore text
115+
*.yaml text
116+
*.yml text
117+
browserslist text
118+
Makefile text
119+
makefile text
120+
121+
## HEROKU
122+
Procfile text
123+
.slugignore text
124+
125+
## GRAPHICS
126+
*.ai binary
127+
*.bmp binary
128+
*.eps binary
129+
*.gif binary
130+
*.ico binary
131+
*.jng binary
132+
*.jp2 binary
133+
*.jpg binary
134+
*.jpeg binary
135+
*.jpx binary
136+
*.jxr binary
137+
*.pdf binary
138+
*.png binary
139+
*.psb binary
140+
*.psd binary
141+
*.svg text
142+
*.svgz binary
143+
*.tif binary
144+
*.tiff binary
145+
*.wbmp binary
146+
*.webp binary
147+
148+
## AUDIO
149+
*.kar binary
150+
*.m4a binary
151+
*.mid binary
152+
*.midi binary
153+
*.mp3 binary
154+
*.ogg binary
155+
*.ra binary
156+
157+
## VIDEO
158+
*.3gpp binary
159+
*.3gp binary
160+
*.as binary
161+
*.asf binary
162+
*.asx binary
163+
*.fla binary
164+
*.flv binary
165+
*.m4v binary
166+
*.mng binary
167+
*.mov binary
168+
*.mp4 binary
169+
*.mpeg binary
170+
*.mpg binary
171+
*.ogv binary
172+
*.swc binary
173+
*.swf binary
174+
*.webm binary
175+
176+
## ARCHIVES
177+
*.7z binary
178+
*.gz binary
179+
*.jar binary
180+
*.rar binary
181+
*.tar binary
182+
*.zip binary
183+
184+
## FONTS
185+
*.ttf binary
186+
*.eot binary
187+
*.otf binary
188+
*.woff binary
189+
*.woff2 binary
190+
191+
## EXECUTABLES
192+
*.exe binary
193+
*.pyc binary

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
yarn.lock

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.prettierrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
singleQuote: true
2+
trailingComma: es5
3+
semi: false

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
node_js:
3+
- '10'
4+
- '8'

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,44 @@
11
# ft
2+
3+
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
4+
[![Module System](https://img.shields.io/badge/module%20system-ES%20Module-brightgreen.svg)](#)
5+
[![Dependency Status](https://img.shields.io/david/2players/ft.svg)](#)
6+
[![Travis Build Status](https://img.shields.io/travis/2players/ft.svg)](#)
7+
[![NPM Downloads](https://img.shields.io/npm/dm/@2players/ft.svg)](#)
8+
9+
10+
> A simple game framework in ECS pattern.
11+
12+
## Install
13+
14+
```
15+
$ npm install @2players/ft
16+
```
17+
18+
## Usage
19+
20+
```js
21+
import ft from '@2players/ft'
22+
23+
ft('unicorns')
24+
//=> 'unicorns & rainbows'
25+
```
26+
27+
## API
28+
29+
### ft(input, [options])
30+
31+
#### input
32+
33+
Type: `string`
34+
35+
Lorem ipsum.
36+
37+
#### options
38+
39+
##### foo
40+
41+
Type: `boolean`<br>
42+
Default: `false`
43+
44+
Lorem ipsum.

babel.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* eslint-env node */
2+
module.exports = function generateConfig(api) {
3+
api.cache(true)
4+
5+
const presets = [
6+
['@babel/preset-env', { useBuiltIns: 'usage', modules: false }],
7+
]
8+
9+
return {
10+
presets,
11+
}
12+
}

package.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"name": "@2players/ft",
3+
"description": "A simple game framework in ECS pattern.",
4+
"version": "0.1.0",
5+
"repository": "2players/ft",
6+
"engines": {
7+
"node": ">=8"
8+
},
9+
"scripts": {
10+
"lint": "eslint 'src/**/*.js' 'test/**/*.js'",
11+
"test": "ava",
12+
"code-quality": "npm run lint && npm run test",
13+
"cleanup": "rm -rf dist",
14+
"transpile": "babel src -d dist",
15+
"copy-files": "cp -r package.json README.md LICENSE dist",
16+
"build": "npm run cleanup && npm run transpile && npm run copy-files",
17+
"release":
18+
"npm run code-quality && npm run build && cd dist && npm publish"
19+
},
20+
"files": [
21+
"*"
22+
],
23+
"main": "index.js",
24+
"keywords": [
25+
""
26+
],
27+
"dependencies": {
28+
"core-js": "^2.5.7"
29+
},
30+
"devDependencies": {
31+
"ava": "1.0.0-rc.1",
32+
"babel-eslint": "^10.0.1",
33+
"@babel/cli": "^7.0.0",
34+
"@babel/core": "^7.0.0",
35+
"@babel/preset-env": "^7.0.0",
36+
"@babel/register": "^7.0.0",
37+
"esm": "^3.0.84",
38+
"eslint": "^5.2.0",
39+
"eslint-plugin-ava": "^5.0.0",
40+
"eslint-plugin-prettier": "^3.0.0",
41+
"eslint-config-prettier": "^3.1.0",
42+
"prettier": "^1.11.1",
43+
"husky": "^1.1.3",
44+
"lint-staged": "^8.0.4"
45+
},
46+
"ava": {
47+
"require": [
48+
"./test/_register.js",
49+
"esm"
50+
]
51+
},
52+
"husky": {
53+
"hooks": {
54+
"pre-commit": "lint-staged"
55+
}
56+
},
57+
"lint-staged": {
58+
"linters": {
59+
"**/*.{json,md}": ["prettier --write", "git add"],
60+
"**/*.js": ["eslint --fix", "git add"]
61+
}
62+
}
63+
}

0 commit comments

Comments
 (0)