Skip to content

Commit

Permalink
rename to type-injector-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuel Hein committed Sep 9, 2022
1 parent d186a3a commit 270305a
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 55 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: test+build type-injector
name: test+build type-injector-lib

on:
push:
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: archive npm package
uses: actions/upload-artifact@v3
with:
path: type-injector*.tgz
path: type-injector-lib*.tgz

release:
needs: build
Expand All @@ -80,7 +80,7 @@ jobs:
id: extract_version
run: |
cd artifact
echo "::set-output name=package_filename::$(ls -1 type-injector*.tgz)"
echo "::set-output name=package_filename::$(ls -1 type-injector-lib*.tgz)"
cd ..
- name: create github release
uses: actions/create-release@v1
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ node_modules
coverage
.DS_Store
tmp
type-injector-*.tgz
type-injector-lib-*.tgz
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Use typescript types to get cdi managed instances of objects.
### Inject a simple class
A simple class is a class that has a constructor without arguments (or no constructor at all). This class can get created from the injector without further configuration:
```typescript
import { TypeInjector } from 'type-injector';
import { TypeInjector } from 'type-injector-lib';

/**
* BaseService without constructor arguments
Expand Down Expand Up @@ -60,7 +60,7 @@ The ```injectConfig``` uses the ```BaseService``` as a value, so it's preserved
### Inject Tokens
Every class that provides an empty constructor or an ```InjectConfig``` and ```Symbol```s can get used as inject token directly. If you use symbols, you lose type-safty. Therefore you can create inject tokens for everything that is not directly usable as inject token (like simple values or configuration objects or functions):
```typescript
import { declareInjectToken, TypeInjector } from 'type-injector';
import { declareInjectToken, TypeInjector } from 'type-injector-lib';

const givenBooleanValue = false;
const tokenForBoolean = declareInjectToken<boolean>('any unique string');
Expand Down
6 changes: 3 additions & 3 deletions build-bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function buildAll() {
}

async function buildCommonJsBundle() {
const outFile = 'type-injector.cjs';
const outFile = 'type-injector-lib.cjs';
/** @type {import('rollup').OutputOptions} */
const outputOptions = {
...defaultOptions.output,
Expand All @@ -43,7 +43,7 @@ async function buildCommonJsBundle() {
}

async function buildEsmBundle() {
const outFile = 'type-injector.mjs';
const outFile = 'type-injector-lib.mjs';
/** @type {import('rollup').OutputOptions} */
const outputOptions = {
...defaultOptions.output,
Expand All @@ -55,7 +55,7 @@ async function buildEsmBundle() {
}

async function buildIifeBundle() {
const outFile = 'type-injector.js';
const outFile = 'type-injector-lib.js';
/** @type {import('rollup').OutputOptions} */
const outputOptions = {
...defaultOptions.output,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "type-injector",
"name": "type-injector-lib",
"version": "1.0.0-alpha",
"description": "inject typescript classes recoursively",
"scripts": {
Expand All @@ -25,7 +25,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/e-hein/type-injector.git"
"url": "https://github.com/e-hein/type-injector-lib.git"
},
"keywords": [
"typescript",
Expand Down Expand Up @@ -61,19 +61,19 @@
"files": [
"dist"
],
"main": "./dist/bundles/type-injector.cjs",
"main": "./dist/bundles/type-injector-lib.cjs",
"types": "./dist/index.d.ts",
"module": "./dist/index.js",
"es2020": "./dist/bundles/type-injector.mjs",
"es2020": "./dist/bundles/type-injector-lib.mjs",
"exports": {
"./package.json": {
"default": "./package.json"
},
".": {
"default": "./dist/bundles/type-injector.mjs",
"default": "./dist/bundles/type-injector-lib.mjs",
"types": "./dist/index.d.ts",
"es2020": "./dist/bundles/type-injector.mjs",
"node": "./dist/bundles/type-injector.cjs"
"es2020": "./dist/bundles/type-injector-lib.mjs",
"node": "./dist/bundles/type-injector-lib.cjs"
}
},
"sideEffects": false
Expand Down
14 changes: 7 additions & 7 deletions typedoc/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
type-injector - v1.0.0-alpha
type-injector-lib - v1.0.0-alpha

# type-injector - v1.0.0-alpha
# type-injector-lib - v1.0.0-alpha

## Table of contents

Expand Down Expand Up @@ -49,7 +49,7 @@ Every class that has a constructor without parameters can get used as InjectToke

#### Defined in

[inject-token.ts:6](https://github.com/e-hein/type-inject/blob/5c37f1b/src/inject-token.ts#L6)
[inject-token.ts:6](https://github.com/e-hein/type-inject/blob/d186a3a/src/inject-token.ts#L6)

___

Expand All @@ -67,7 +67,7 @@ To configure any dependency type-safe you can [declare an inject token](README.m

#### Defined in

[inject-token.ts:45](https://github.com/e-hein/type-inject/blob/5c37f1b/src/inject-token.ts#L45)
[inject-token.ts:45](https://github.com/e-hein/type-inject/blob/d186a3a/src/inject-token.ts#L45)

___

Expand All @@ -89,7 +89,7 @@ An InjectToken can be a [ConstructorWithoutArguments](README.md#constructorwitho

#### Defined in

[inject-token.ts:53](https://github.com/e-hein/type-inject/blob/5c37f1b/src/inject-token.ts#L53)
[inject-token.ts:53](https://github.com/e-hein/type-inject/blob/d186a3a/src/inject-token.ts#L53)

___

Expand All @@ -116,7 +116,7 @@ class instance.

#### Defined in

[inject-token.ts:34](https://github.com/e-hein/type-inject/blob/5c37f1b/src/inject-token.ts#L34)
[inject-token.ts:34](https://github.com/e-hein/type-inject/blob/d186a3a/src/inject-token.ts#L34)

## Functions

Expand Down Expand Up @@ -151,4 +151,4 @@ a token that can be used to first provide then inject anything

#### Defined in

[inject-token.ts:67](https://github.com/e-hein/type-inject/blob/5c37f1b/src/inject-token.ts#L67)
[inject-token.ts:67](https://github.com/e-hein/type-inject/blob/d186a3a/src/inject-token.ts#L67)
6 changes: 3 additions & 3 deletions typedoc/classes/BasicTypeInjector.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[type-injector - v1.0.0-alpha](../README.md) / BasicTypeInjector
[type-injector-lib - v1.0.0-alpha](../README.md) / BasicTypeInjector

# Class: BasicTypeInjector

Expand Down Expand Up @@ -49,7 +49,7 @@ Create a simple new top level injector.

#### Defined in

[basic-type-injector.ts:35](https://github.com/e-hein/type-inject/blob/5c37f1b/src/basic-type-injector.ts#L35)
[basic-type-injector.ts:35](https://github.com/e-hein/type-inject/blob/d186a3a/src/basic-type-injector.ts#L35)

## Methods

Expand Down Expand Up @@ -81,4 +81,4 @@ a value that implements the type defined by the token.

#### Defined in

[basic-type-injector.ts:23](https://github.com/e-hein/type-inject/blob/5c37f1b/src/basic-type-injector.ts#L23)
[basic-type-injector.ts:23](https://github.com/e-hein/type-inject/blob/d186a3a/src/basic-type-injector.ts#L23)
8 changes: 4 additions & 4 deletions typedoc/classes/InjectorScope.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[type-injector - v1.0.0-alpha](../README.md) / InjectorScope
[type-injector-lib - v1.0.0-alpha](../README.md) / InjectorScope

# Class: InjectorScope

Expand Down Expand Up @@ -29,7 +29,7 @@ A scope is a child injector that might provide additional values or override imp

#### Defined in

[injector-scope.ts:62](https://github.com/e-hein/type-inject/blob/5c37f1b/src/injector-scope.ts#L62)
[injector-scope.ts:62](https://github.com/e-hein/type-inject/blob/d186a3a/src/injector-scope.ts#L62)

## Methods

Expand Down Expand Up @@ -65,7 +65,7 @@ a value that implements the type defined by the token.

#### Defined in

[basic-type-injector.ts:23](https://github.com/e-hein/type-inject/blob/5c37f1b/src/basic-type-injector.ts#L23)
[basic-type-injector.ts:23](https://github.com/e-hein/type-inject/blob/d186a3a/src/basic-type-injector.ts#L23)

___

Expand Down Expand Up @@ -93,4 +93,4 @@ InjectorScope.construct()

#### Defined in

[injector-scope.ts:24](https://github.com/e-hein/type-inject/blob/5c37f1b/src/injector-scope.ts#L24)
[injector-scope.ts:24](https://github.com/e-hein/type-inject/blob/d186a3a/src/injector-scope.ts#L24)
8 changes: 4 additions & 4 deletions typedoc/classes/Logger.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[type-injector - v1.0.0-alpha](../README.md) / Logger
[type-injector-lib - v1.0.0-alpha](../README.md) / Logger

# Class: Logger

Expand Down Expand Up @@ -55,7 +55,7 @@ to log more details / log in a different way.

#### Defined in

[logger.ts:10](https://github.com/e-hein/type-inject/blob/5c37f1b/src/logger.ts#L10)
[logger.ts:10](https://github.com/e-hein/type-inject/blob/d186a3a/src/logger.ts#L10)

___

Expand All @@ -80,7 +80,7 @@ ___

#### Defined in

[logger.ts:11](https://github.com/e-hein/type-inject/blob/5c37f1b/src/logger.ts#L11)
[logger.ts:11](https://github.com/e-hein/type-inject/blob/d186a3a/src/logger.ts#L11)

## Methods

Expand All @@ -101,4 +101,4 @@ ___

#### Defined in

[logger.ts:12](https://github.com/e-hein/type-inject/blob/5c37f1b/src/logger.ts#L12)
[logger.ts:12](https://github.com/e-hein/type-inject/blob/d186a3a/src/logger.ts#L12)
8 changes: 4 additions & 4 deletions typedoc/classes/TypeInjector.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[type-injector - v1.0.0-alpha](../README.md) / TypeInjector
[type-injector-lib - v1.0.0-alpha](../README.md) / TypeInjector

# Class: TypeInjector

Expand Down Expand Up @@ -45,7 +45,7 @@ Create a simple new top level injector.

#### Defined in

[basic-type-injector.ts:35](https://github.com/e-hein/type-inject/blob/5c37f1b/src/basic-type-injector.ts#L35)
[basic-type-injector.ts:35](https://github.com/e-hein/type-inject/blob/d186a3a/src/basic-type-injector.ts#L35)

## Methods

Expand Down Expand Up @@ -81,7 +81,7 @@ a value that implements the type defined by the token.

#### Defined in

[basic-type-injector.ts:23](https://github.com/e-hein/type-inject/blob/5c37f1b/src/basic-type-injector.ts#L23)
[basic-type-injector.ts:23](https://github.com/e-hein/type-inject/blob/d186a3a/src/basic-type-injector.ts#L23)

___

Expand All @@ -105,4 +105,4 @@ TypeInjectorBuilder

#### Defined in

[type-injector.ts:19](https://github.com/e-hein/type-inject/blob/5c37f1b/src/type-injector.ts#L19)
[type-injector.ts:19](https://github.com/e-hein/type-inject/blob/d186a3a/src/type-injector.ts#L19)
10 changes: 5 additions & 5 deletions typedoc/classes/TypeInjectorBuilder.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[type-injector - v1.0.0-alpha](../README.md) / TypeInjectorBuilder
[type-injector-lib - v1.0.0-alpha](../README.md) / TypeInjectorBuilder

# Class: TypeInjectorBuilder

Expand Down Expand Up @@ -61,7 +61,7 @@ Finish configuration of the TypeInjector

#### Defined in

[type-injector.ts:125](https://github.com/e-hein/type-inject/blob/5c37f1b/src/type-injector.ts#L125)
[type-injector.ts:125](https://github.com/e-hein/type-inject/blob/d186a3a/src/type-injector.ts#L125)

___

Expand Down Expand Up @@ -94,7 +94,7 @@ the Injector itself to allow chaining provides

#### Defined in

[type-injector.ts:80](https://github.com/e-hein/type-inject/blob/5c37f1b/src/type-injector.ts#L80)
[type-injector.ts:80](https://github.com/e-hein/type-inject/blob/d186a3a/src/type-injector.ts#L80)

___

Expand Down Expand Up @@ -129,7 +129,7 @@ the Injector itself to allow chaining provides

#### Defined in

[type-injector.ts:97](https://github.com/e-hein/type-inject/blob/5c37f1b/src/type-injector.ts#L97)
[type-injector.ts:97](https://github.com/e-hein/type-inject/blob/d186a3a/src/type-injector.ts#L97)

___

Expand Down Expand Up @@ -164,4 +164,4 @@ the Injector itself to allow chaining provides

#### Defined in

[type-injector.ts:65](https://github.com/e-hein/type-inject/blob/5c37f1b/src/type-injector.ts#L65)
[type-injector.ts:65](https://github.com/e-hein/type-inject/blob/d186a3a/src/type-injector.ts#L65)
4 changes: 2 additions & 2 deletions typedoc/interfaces/InjectConfig.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[type-injector - v1.0.0-alpha](../README.md) / InjectConfig
[type-injector-lib - v1.0.0-alpha](../README.md) / InjectConfig

# Interface: InjectConfig

Expand Down Expand Up @@ -33,4 +33,4 @@ itself gets created.

#### Defined in

[inject-token.ts:21](https://github.com/e-hein/type-inject/blob/5c37f1b/src/inject-token.ts#L21)
[inject-token.ts:21](https://github.com/e-hein/type-inject/blob/d186a3a/src/inject-token.ts#L21)
10 changes: 5 additions & 5 deletions typedoc/interfaces/InjectFactory.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[type-injector - v1.0.0-alpha](../README.md) / InjectFactory
[type-injector-lib - v1.0.0-alpha](../README.md) / InjectFactory

# Interface: InjectFactory<T\>

Expand Down Expand Up @@ -47,7 +47,7 @@ Define a factory method with dependencies to create an injectable value.

#### Defined in

[inject-factory.ts:9](https://github.com/e-hein/type-inject/blob/5c37f1b/src/inject-factory.ts#L9)
[inject-factory.ts:9](https://github.com/e-hein/type-inject/blob/d186a3a/src/inject-factory.ts#L9)

___

Expand All @@ -72,7 +72,7 @@ itself gets created.

#### Defined in

[inject-token.ts:21](https://github.com/e-hein/type-inject/blob/5c37f1b/src/inject-token.ts#L21)
[inject-token.ts:21](https://github.com/e-hein/type-inject/blob/d186a3a/src/inject-token.ts#L21)

___

Expand All @@ -82,7 +82,7 @@ ___

#### Defined in

[inject-factory.ts:7](https://github.com/e-hein/type-inject/blob/5c37f1b/src/inject-factory.ts#L7)
[inject-factory.ts:7](https://github.com/e-hein/type-inject/blob/d186a3a/src/inject-factory.ts#L7)

___

Expand All @@ -92,4 +92,4 @@ ___

#### Defined in

[inject-factory.ts:8](https://github.com/e-hein/type-inject/blob/5c37f1b/src/inject-factory.ts#L8)
[inject-factory.ts:8](https://github.com/e-hein/type-inject/blob/d186a3a/src/inject-factory.ts#L8)
Loading

0 comments on commit 270305a

Please sign in to comment.