Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide @loopback/metadata from framework-level documentation #5696

Merged
merged 3 commits into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/site/Creating-decorators.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ source: loopback-next
file: packages/metadata/README.md
sidebar: lb4_sidebar
permalink: /doc/en/lb4/Creating-decorators.html
summary: A tutorial to use `@loopback/metadata` module to create new decorators
summary: A tutorial to use `@loopback/core` module to create new decorators
---
2 changes: 1 addition & 1 deletion docs/site/tutorials/core/10-advanced-recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You can create your own
[decorator](https://loopback.io/doc/en/lb4/Decorators.html):

1. Create a new decorator from scratch by using `DecoratorFactory` from
`@loopback/metadata`. See an example in
`@loopback/core`. See an example in
[custom-inject-decorator.ts](https://github.com/strongloop/loopback-next/blob/master/examples/context/src/custom-inject-decorator.ts)

2. Create a sugar decorator for an existing decorator.
Expand Down
11 changes: 7 additions & 4 deletions docs/site/tutorials/core/2-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,16 @@ LoopBack 4 core is an open source TypeScript platform for Node.js, specializing
in building large scale applications with great flexibility, composability, and
extensibility.

The following key modules are used by the LoopBack framework to offer API and
Microservice capabilities. They can be used independently as a base platform to
build large scale applications in TypeScript and Node.js.
The module [@loopback/core](https://www.npmjs.com/package/@loopback/core) is
used by the LoopBack framework to offer API and Microservice capabilities.

It builds on top of the following lower-level modules:

- [@loopback/metadata](https://www.npmjs.com/package/@loopback/metadata)
- [@loopback/context](https://www.npmjs.com/package/@loopback/context)
- [@loopback/core](https://www.npmjs.com/package/@loopback/core)

Any of these three modules can be used independently as a base platform to build
large scale applications in TypeScript and Node.js.

## Design goals

Expand Down
4 changes: 2 additions & 2 deletions examples/log-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ extension to add extra processing accordingly.

For this extension, the decorator marks which controller methods should be
logged (and optionally at which level they should be logged). We leverage
`@loopback/metadata` module to implement the decorator and inspection function.
`@loopback/core` module to implement the decorator and inspection function.

```ts
import {LOG_LEVEL, EXAMPLE_LOG_BINDINGS} from '../keys';
import {
Constructor,
MethodDecoratorFactory,
MetadataInspector,
} from '@loopback/context';
} from '@loopback/core';
import {LevelMetadata} from '../types';

/**
Expand Down
4 changes: 2 additions & 2 deletions examples/log-extension/src/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// License text available at https://opensource.org/licenses/MIT

import {BindingKey} from '@loopback/core';
import {TimerFn, LogFn, LogWriterFn} from './types';
import {LogFn, LogWriterFn, TimerFn} from './types';

/**
* Binding keys used by this component.
Expand All @@ -19,7 +19,7 @@ export namespace EXAMPLE_LOG_BINDINGS {
}

/**
* The key used to store log-related via @loopback/metadata and reflection.
* The key used to store log-related metadata via decorators and reflection.
*/
export const EXAMPLE_LOG_METADATA_KEY = 'example.log.metadata';

Expand Down
1 change: 0 additions & 1 deletion extensions/authentication-passport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"dependencies": {
"@loopback/authentication": "^4.2.6",
"@loopback/core": "^2.7.1",
"@loopback/metadata": "^2.1.6",
"@loopback/openapi-v3": "^3.4.2",
"@loopback/rest": "^5.1.0",
"@loopback/security": "^0.2.11",
Expand Down
3 changes: 0 additions & 3 deletions extensions/authentication-passport/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
{
"path": "../../packages/core/tsconfig.json"
},
{
"path": "../../packages/metadata/tsconfig.json"
},
{
"path": "../../packages/openapi-spec-builder/tsconfig.json"
},
Expand Down
1 change: 0 additions & 1 deletion packages/authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
},
"dependencies": {
"@loopback/core": "^2.7.1",
"@loopback/metadata": "^2.1.6",
"@loopback/openapi-v3": "^3.4.2",
"@loopback/rest": "^5.1.0",
"@loopback/security": "^0.2.11",
Expand Down
3 changes: 0 additions & 3 deletions packages/authentication/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
{
"path": "../core/tsconfig.json"
},
{
"path": "../metadata/tsconfig.json"
},
{
"path": "../openapi-spec-builder/tsconfig.json"
},
Expand Down