-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4c832b
commit ea98156
Showing
28 changed files
with
23,764 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/coverage | ||
/dist | ||
/docs | ||
/node_modules | ||
/src | ||
/test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[*] | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length = 200 | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/coverage | ||
/dist | ||
/docs | ||
/node_modules | ||
/madoc.config.js | ||
/vue.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/.docs | ||
/coverage | ||
/dist | ||
/docs/vue/dist | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM nginx:alpine | ||
|
||
COPY ./devops/nginx.conf /etc/nginx/conf.d/default.conf | ||
|
||
COPY ./.docs /usr/share/nginx/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,64 @@ | ||
# mollithia | ||
# Mollitia | ||
|
||
> JavaScript Resilience Library | ||
<!-- TODO Description --> | ||
|
||
## Documentation | ||
|
||
<!-- TODO Change --> | ||
[Full documentation website can be find here.](http://135.39.45.156:8080) | ||
|
||
## Installation | ||
|
||
### With Node or any web UI Framework | ||
|
||
``` bash | ||
# Install the dependency | ||
npm install mollitia --save | ||
``` | ||
|
||
``` javascript | ||
// Javascript | ||
const { Circuit } = require('mollitia'); | ||
``` | ||
|
||
``` typescript | ||
// ES6 or TypeScript | ||
import { Circuit } from 'mollitia'; | ||
``` | ||
|
||
### With CDN | ||
|
||
``` html | ||
<!-- CDN --> | ||
<script type="text/javascript" src="https://unpkg.com/mollitia"></script> | ||
<script> | ||
const { Circuit } = window.Mollitia; | ||
</script> | ||
``` | ||
|
||
## Usage | ||
|
||
<!-- TODO change --> | ||
``` javascript | ||
const myCircuit = new Circuit({ | ||
name: 'dummy', | ||
options: { | ||
// Customize the circuit here | ||
} | ||
}); | ||
// First param is your async function | ||
// Other params will directly be passed to this function | ||
myCircuit.execute(anyAsyncFunction, param1, param2, ...); | ||
``` | ||
|
||
## Features | ||
|
||
<!-- TODO update --> | ||
|
||
- Works on Node and on browser (even **IE11**, wow). | ||
- Can add `timeout` to your async methods. | ||
- Customize your circuit with [a wide variety of options](/api/options). | ||
|
||
<!-- TODO comparison with resilience4j --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
npm run build | ||
docker build -t 135.39.45.156:80/genesys/mollitia:latest . | ||
docker push 135.39.45.156:80/genesys/mollitia:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
server { | ||
listen 80; | ||
listen [::]:80; | ||
server_name localhost; | ||
root /usr/share/nginx/html; | ||
location / { | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
transform: { | ||
".(ts|tsx)": "ts-jest" | ||
}, | ||
testEnvironment: "node", | ||
testRegex: "(/test/.*|\\.spec)\\.ts$", | ||
moduleFileExtensions: [ | ||
"ts", | ||
"js" | ||
], | ||
coveragePathIgnorePatterns: [ | ||
"/node_modules", | ||
"/test" | ||
], | ||
collectCoverage: true, | ||
collectCoverageFrom: [ | ||
"src/**/*.ts" | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const pkg = require('./package.json'); | ||
|
||
module.exports = { | ||
title: 'Mollitia', | ||
description: pkg.description, | ||
distPath: '.docs', | ||
assets: [ | ||
{ | ||
src: './dist/mollitia.umd.js' | ||
}, | ||
{ | ||
src: './docs/assets' | ||
} | ||
], | ||
head: [ | ||
'<script src="/assets/mollitia.umd.js"></script>' | ||
], | ||
watch: [ | ||
'./dist' | ||
], | ||
components: [ | ||
require('./docs/vue/index.js') | ||
] | ||
}; |
Oops, something went wrong.