Skip to content

Commit 8e2d022

Browse files
committed
[refactor] rewrite Core Logic based on TypeScript
1 parent 8256b1b commit 8e2d022

File tree

13 files changed

+163
-6514
lines changed

13 files changed

+163
-6514
lines changed

.esdoc.json

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

.eslintrc.json

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,11 @@
22
"env": {
33
"es6": true,
44
"node": true,
5-
"browser": true,
6-
"mocha": true
5+
"jest": true
76
},
7+
"parser": "@typescript-eslint/parser",
88
"parserOptions": {
9-
"ecmaVersion": 9,
109
"sourceType": "module"
1110
},
12-
"extends": "eslint:recommended",
13-
"rules": {
14-
"indent": [
15-
"error",
16-
4,
17-
{
18-
"SwitchCase": 1
19-
}
20-
],
21-
"linebreak-style": ["error", "unix"],
22-
"quotes": ["error", "single"],
23-
"semi": ["error", "always"],
24-
"no-cond-assign": "off",
25-
"getter-return": "warn",
26-
"no-console": [
27-
"error",
28-
{
29-
"allow": ["info", "warn", "error", "time", "timeEnd"]
30-
}
31-
],
32-
"valid-jsdoc": [
33-
"error",
34-
{
35-
"prefer": {
36-
"returns": "return"
37-
},
38-
"requireParamDescription": false,
39-
"requireReturn": false,
40-
"requireReturnDescription": false
41-
}
42-
]
43-
}
11+
"extends": ["eslint:recommended", "plugin:prettier/recommended"]
4412
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Node.JS
22
node_modules/
3+
package-lock.json
34

45
# Building
56
dist/
7+
.rts2_cache_*/
68
docs/
79

810
# IDE

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.editorconfig
22
.eslintrc.json
33
test/
4-
.esdoc.json
4+
.rts2_cache_*/
55
docs/
66
.travis.yml

.travis.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ cache:
1212
install:
1313
- npm install
1414
script:
15-
- npm test
16-
- cd ${FOLDER}
17-
- git init
18-
- git config user.name ${UID}
19-
- git config user.email ${EMAIL}
20-
- git add .
21-
- git commit -m "${MESSAGE}"
22-
- git push --force --quiet https://${TOKEN}@${GIT_URI}.git master:gh-pages
15+
- npm run ${SCRIPT}
16+
deploy:
17+
provider: pages
18+
on:
19+
branch: master
20+
skip_cleanup: true
21+
local_dir: ${FOLDER}
22+
github_token: ${TOKEN}

ReadMe.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
# OnionStack
22

3-
**Middleware** framework based on [Async Generator][1] of ECMAScript 2018, inspired by [Koa 2][2].
3+
**Middleware** framework based on [Async Generator][1] & [TypeScript][2], inspired by [Koa 2][3].
44

5-
[![NPM Dependency](https://david-dm.org/TechQuery/onion-stack.svg)](https://david-dm.org/TechQuery/onion-stack)
6-
[![Build Status](https://travis-ci.com/TechQuery/onion-stack.svg?branch=master)](https://travis-ci.com/TechQuery/onion-stack)
7-
[![](https://data.jsdelivr.com/v1/package/npm/onion-stack/badge?style=rounded)](https://www.jsdelivr.com/package/npm/onion-stack)
5+
[![NPM Dependency](https://david-dm.org/TechQuery/onion-stack.svg)][4]
6+
[![Build Status](https://travis-ci.com/TechQuery/onion-stack.svg?branch=master)][5]
7+
[![](https://data.jsdelivr.com/v1/package/npm/onion-stack/badge?style=rounded)][6]
88

9-
[![NPM](https://nodei.co/npm/onion-stack.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/onion-stack/)
9+
[![NPM](https://nodei.co/npm/onion-stack.png?downloads=true&downloadRank=true&stars=true)][7]
1010

1111
## Example
1212

1313
```JavaScript
1414
import OnionStack from 'onion-stack';
1515

16-
1716
const list = [ ];
1817

1918
const stack = new OnionStack(
@@ -45,7 +44,12 @@ const stack = new OnionStack(
4544
stack.execute().then(() => console.log( list )); // [1, 4, 6, 5, 2]
4645
```
4746

48-
[More cases](https://tech-query.me/onion-stack/test.html)
47+
[More cases](https://github.com/TechQuery/onion-stack/tree/master/test)
4948

5049
[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of#Iterating_over_async_generators
51-
[2]: https://koajs.com
50+
[2]: https://www.typescriptlang.org
51+
[3]: https://koajs.com
52+
[4]: https://david-dm.org/TechQuery/onion-stack
53+
[5]: https://travis-ci.com/TechQuery/onion-stack
54+
[6]: https://www.jsdelivr.com/package/npm/onion-stack
55+
[7]: https://nodei.co/npm/onion-stack/

0 commit comments

Comments
 (0)