dyo-tools 0.1.0-rc1 → 0.1.0-rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/package.json +2 -1
- package/.c8rc.json +0 -4
- package/.eslintignore +0 -2
- package/.eslintrc.json +0 -41
- package/Makefile +0 -34
- package/TODO.md +0 -18
- package/babel.config.js +0 -1
- package/docs/.nojekyll +0 -1
- package/docs/assets/highlight.css +0 -22
- package/docs/assets/icons.css +0 -1043
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/main.js +0 -52
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1388
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/classes/DTBunch.html +0 -265
- package/docs/classes/DTComponent.html +0 -49
- package/docs/classes/DTComponentWithMeta.html +0 -73
- package/docs/classes/DTElement.html +0 -95
- package/docs/classes/DTError.html +0 -32
- package/docs/classes/DTPlayer.html +0 -86
- package/docs/index.html +0 -1
- package/docs/modules.html +0 -1
- package/jest.config.js +0 -6
- package/src/core/DTBunch.ts +0 -600
- package/src/core/DTComponent.ts +0 -135
- package/src/core/DTComponentWithMeta.ts +0 -62
- package/src/core/DTElement.ts +0 -96
- package/src/core/DTError.ts +0 -78
- package/src/core/DTPlayer.ts +0 -57
- package/src/index.ts +0 -7
- package/src/types/index.ts +0 -76
- package/src/utils/filters.ts +0 -64
- package/test/core/DTBunch.double.ts +0 -150
- package/test/core/DTBunch.spec.ts +0 -1374
- package/test/core/DTComponent.double.ts +0 -69
- package/test/core/DTComponent.spec.ts +0 -182
- package/test/core/DTComponentWithMeta.double.ts +0 -88
- package/test/core/DTComponentWithMeta.spec.ts +0 -112
- package/test/core/DTElement.double.ts +0 -27
- package/test/core/DTElement.spec.ts +0 -181
- package/test/core/DTError.double.ts +0 -43
- package/test/core/DTError.spec.ts +0 -106
- package/test/core/DTPlayer.double.ts +0 -49
- package/test/core/DTPlayer.spec.ts +0 -102
- package/test/utils/filters.spec.ts +0 -109
- package/tsconfig.json +0 -21
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dyo-tools",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-rc2",
|
|
4
4
|
"description": "Provide component classes to manage any board game instance.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"author": "Flaya for DYO System",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"keywords": ["game", "DYO", "board game"],
|
|
22
|
+
"files": ["dist/*"],
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"@babel/preset-env": "^7.14.7",
|
|
24
25
|
"@types/jest": "^27.4.0",
|
package/.c8rc.json
DELETED
package/.eslintignore
DELETED
package/.eslintrc.json
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"parser": "@typescript-eslint/parser",
|
|
4
|
-
"parserOptions": {
|
|
5
|
-
"project": "./tsconfig.json"
|
|
6
|
-
},
|
|
7
|
-
"plugins": [
|
|
8
|
-
"@typescript-eslint"
|
|
9
|
-
],
|
|
10
|
-
"extends": [
|
|
11
|
-
"eslint:recommended",
|
|
12
|
-
"plugin:@typescript-eslint/eslint-recommended",
|
|
13
|
-
"plugin:@typescript-eslint/recommended",
|
|
14
|
-
"airbnb-base",
|
|
15
|
-
"airbnb-typescript"
|
|
16
|
-
],
|
|
17
|
-
"rules": {
|
|
18
|
-
// Use of underscored private props
|
|
19
|
-
"no-underscore-dangle": "off",
|
|
20
|
-
// Disable JSX unexpected error
|
|
21
|
-
"react/jsx-filename-extension": "off",
|
|
22
|
-
// Max length line : 130
|
|
23
|
-
"max-len": ["error", 130],
|
|
24
|
-
// Authorize for-of to return and break
|
|
25
|
-
"no-restricted-syntax": [
|
|
26
|
-
"error",
|
|
27
|
-
{
|
|
28
|
-
"selector": "ForInStatement",
|
|
29
|
-
"message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"selector": "LabeledStatement",
|
|
33
|
-
"message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"selector": "WithStatement",
|
|
37
|
-
"message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize."
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
}
|
package/Makefile
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
.DEFAULT_GOAL := all
|
|
2
|
-
|
|
3
|
-
.PHONY: all
|
|
4
|
-
all: dist
|
|
5
|
-
|
|
6
|
-
.PHONY: check
|
|
7
|
-
check:
|
|
8
|
-
npm run-script lint
|
|
9
|
-
|
|
10
|
-
.PHONY: checkfix
|
|
11
|
-
checkfix:
|
|
12
|
-
npm run-script lint:fix
|
|
13
|
-
|
|
14
|
-
.PHONY: clean
|
|
15
|
-
clean: distclean
|
|
16
|
-
rm -Rf node_modules/
|
|
17
|
-
|
|
18
|
-
dist: node_modules distclean
|
|
19
|
-
npm run-script build
|
|
20
|
-
|
|
21
|
-
.PHONY: distclean
|
|
22
|
-
distclean:
|
|
23
|
-
rm -Rf dist/
|
|
24
|
-
|
|
25
|
-
node_modules:
|
|
26
|
-
npm install
|
|
27
|
-
|
|
28
|
-
.PHONY: test
|
|
29
|
-
test:
|
|
30
|
-
npm run-script test
|
|
31
|
-
|
|
32
|
-
.PHONY: verify
|
|
33
|
-
verify: dist check
|
|
34
|
-
npm run-script test:coverage:verify
|
package/TODO.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
### TODO
|
|
2
|
-
|
|
3
|
-
#### Mise en place du TDD + Tests
|
|
4
|
-
|
|
5
|
-
En suivant les best practices des tests unitaires et TDD accordées :
|
|
6
|
-
|
|
7
|
-
* Structure de test/ égale à celle de src/
|
|
8
|
-
* Tester chaque fichier pour avoir la plus grande couverture de test
|
|
9
|
-
* Créer des "stubs" pour éviter les dépendances dans les tests
|
|
10
|
-
* Ne pas créer de fausses classes
|
|
11
|
-
* Mettre en place la structure "describe(method)" => "test(useCase)"
|
|
12
|
-
|
|
13
|
-
#### Liste de tâches
|
|
14
|
-
|
|
15
|
-
* Eslint
|
|
16
|
-
* Test coverage package
|
|
17
|
-
* Array.isArray dans les filters DTBunch
|
|
18
|
-
* Restreindre les types dans les meta-data
|
package/babel.config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = {presets: ['@babel/preset-env']}
|
package/docs/.nojekyll
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--light-code-background: #FFFFFF;
|
|
3
|
-
--dark-code-background: #1E1E1E;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
@media (prefers-color-scheme: light) { :root {
|
|
7
|
-
--code-background: var(--light-code-background);
|
|
8
|
-
} }
|
|
9
|
-
|
|
10
|
-
@media (prefers-color-scheme: dark) { :root {
|
|
11
|
-
--code-background: var(--dark-code-background);
|
|
12
|
-
} }
|
|
13
|
-
|
|
14
|
-
body.light {
|
|
15
|
-
--code-background: var(--light-code-background);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
body.dark {
|
|
19
|
-
--code-background: var(--dark-code-background);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
pre, code { background: var(--code-background); }
|