Skip to content

Commit

Permalink
Add factory method
Browse files Browse the repository at this point in the history
  • Loading branch information
betula committed Feb 15, 2020
1 parent 6014069 commit cb508c0
Show file tree
Hide file tree
Showing 11 changed files with 278 additions and 235 deletions.
23 changes: 23 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"tsconfigRootDir": ".",
},
"plugins": ["@typescript-eslint"],
"rules": {
"quotes": ["error", "double"],
"no-empty": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/await-thenable": 0,
"@typescript-eslint/no-use-before-define": 0
},
};
19 changes: 11 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@
*.swp
.DS_Store
tmp/
npm-debug.log
yarn-error.log

.vscode/
.idea/
node_modules/
.dist/
coverage/

npm-debug.log
yarn-error.log
/package-lock.json
/yarn.lock
examples/*/package-lock.json
examples/*/yarn.lock

node_modules/

release/
coverage/

# Docusaurus

Expand All @@ -23,6 +29,3 @@ website/yarn.lock
website/package-lock.json
website/node_modules
website/i18n/*

examples/*/package-lock.json
examples/*/yarn.lock
22 changes: 0 additions & 22 deletions .npmignore

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cache:
install:
- npm install
script:
- npm run tslint
- npm run eslint
- npm run build
- npm run test-with-coveralls
jobs:
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ Clean all cached dependency instances and overrides. Has no parameters.
reset()
```

**factory**

Make new DI.

```javascript
const { provide, assign, override, cleanup, reset } = factory();
```
---

If you have questions or something else for me or this project, maybe architectures questions, improvement ideas or anything else, please make the issue.
8 changes: 8 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,11 @@ Clean all cached dependency instances and overrides. Has no parameters.
```javascript
reset()
```

## factory

Make new DI.

```javascript
const { provide, assign, override, cleanup, reset } = factory();
```

0 comments on commit cb508c0

Please sign in to comment.