Skip to content

Commit

Permalink
chore: feedback
Browse files Browse the repository at this point in the history
More feedback

Signed-off-by: Yaapa Hage <[email protected]>
  • Loading branch information
Yaapa Hage committed Aug 28, 2020
1 parent 7df1e9d commit c89ee7f
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 44 deletions.
39 changes: 24 additions & 15 deletions docs/site/Component.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,23 +88,39 @@ app.component(AuthenticationComponent);
Here is a list of components officially created and maintained by the LoopBack
team.

- [@loopback/apiconnect](https://github.com/strongloop/loopback-next/tree/master/extensions/apiconnect) -
An extension for integrating with
[IBM API Connect](https://www.ibm.com/cloud/api-connect)
### Core components

These components implement the primary LoopBack capabilities.

- [@loopback/authentication](https://github.com/strongloop/loopback-next/tree/master/packages/authentication) -
A LoopBack component for authentication support
- [@loopback/authentication-jwt](https://github.com/strongloop/loopback-next/tree/master/extensions/authentication-jwt) -
Extension for JWT authentication
- [@loopback/authentication-passport](https://github.com/strongloop/loopback-next/tree/master/extensions/authentication-passport) -
A package creating adapters between the passport module and
@loopback/authentication
- [@loopback/authorization](https://github.com/strongloop/loopback-next/tree/master/packages/authorization) -
A LoopBack component for authorization support
- [@loopback/boot](https://github.com/strongloop/loopback-next/tree/master/packages/boot) -
A collection of Booters for LoopBack 4 Applications
- [@loopback/booter-lb3app](https://github.com/strongloop/loopback-next/tree/master/packages/booter-lb3app) -
A booter component for LoopBack 3 applications to expose their REST API via
LoopBack 4
- [@loopback/rest](https://github.com/strongloop/loopback-next/tree/master/packages/rest) -
Expose controllers as REST endpoints and route REST API requests to controller
methods
- [@loopback/rest-crud](https://github.com/strongloop/loopback-next/tree/master/packages/rest-crud) -
REST API controller implementing default CRUD semantics
- [@loopback/rest-explorer](https://github.com/strongloop/loopback-next/tree/master/packages/rest-explorer) -
LoopBack's API Explorer

### Extensions

These components add additional capabilities to LoopBack.

- [@loopback/apiconnect](https://github.com/strongloop/loopback-next/tree/master/extensions/apiconnect) -
An extension for integrating with
[IBM API Connect](https://www.ibm.com/cloud/api-connect)
- [@loopback/authentication-jwt](https://github.com/strongloop/loopback-next/tree/master/extensions/authentication-jwt) -
Extension for JWT authentication
- [@loopback/authentication-passport](https://github.com/strongloop/loopback-next/tree/master/extensions/authentication-passport) -
A package creating adapters between the passport module and
@loopback/authentication
- [@loopback/context-explorer](https://github.com/strongloop/loopback-next/tree/master/extensions/context-explorer) -
Visualize context hierarchy, bindings, configurations, and dependencies
- [@loopback/cron](https://github.com/strongloop/loopback-next/tree/master/extensions/cron) -
Expand All @@ -117,13 +133,6 @@ team.
An extension exposes metrics for Prometheus with LoopBack 4
- [@loopback/pooling](https://github.com/strongloop/loopback-next/tree/master/extensions/pooling) -
Resource pooling service for LoopBack 4
- [@loopback/rest](https://github.com/strongloop/loopback-next/tree/master/packages/rest) -
Expose controllers as REST endpoints and route REST API requests to controller
methods
- [@loopback/rest-crud](https://github.com/strongloop/loopback-next/tree/master/packages/rest-crud) -
REST API controller implementing default CRUD semantics
- [@loopback/rest-explorer](https://github.com/strongloop/loopback-next/tree/master/packages/rest-explorer) -
LoopBack's API Explorer
- [@loopback/typeorm](https://github.com/strongloop/loopback-next/tree/master/extensions/typeorm) -
Adds support for TypeORM in LoopBack

Expand Down
20 changes: 2 additions & 18 deletions docs/site/Extending-LoopBack-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,24 +189,8 @@ An application-level component usually contributes:

### Learn from existing ones

- [loopback4-example-log-extension](https://github.com/strongloop/loopback-next/tree/master/examples/log-extension)
- [@loopback/apiconnect](https://github.com/strongloop/loopback-next/tree/master/extensions/apiconnect)
- [@loopback/authentication](https://github.com/strongloop/loopback-next/tree/master/packages/authentication)
- [@loopback/authentication-jwt](https://github.com/strongloop/loopback-next/tree/master/extensions/authentication-jwt)
- [@loopback/authentication-passport](https://github.com/strongloop/loopback-next/tree/master/extensions/authentication-passport)
- [@loopback/authorization](https://github.com/strongloop/loopback-next/tree/master/packages/authorization)
- [@loopback/boot](https://github.com/strongloop/loopback-next/tree/master/packages/boot)
- [@loopback/booter-lb3app](https://github.com/strongloop/loopback-next/tree/master/packages/booter-lb3app)
- [@loopback/context-explorer](https://github.com/strongloop/loopback-next/tree/master/extensions/context-explorer)
- [@loopback/cron](https://github.com/strongloop/loopback-next/tree/master/extensions/cron)
- [@loopback/extension-health](https://github.com/strongloop/loopback-next/tree/master/extensions/health)
- [@loopback/extension-logging](https://github.com/strongloop/loopback-next/tree/master/extensions/logging)
- [@loopback/extension-metrics](https://github.com/strongloop/loopback-next/tree/master/extensions/metrics)
- [@loopback/pooling](https://github.com/strongloop/loopback-next/tree/master/extensions/pooling)
- [@loopback/rest](https://github.com/strongloop/loopback-next/tree/master/packages/rest)
- [@loopback/rest-crud](https://github.com/strongloop/loopback-next/tree/master/packages/rest-crud)
- [@loopback/rest-explorer](https://github.com/strongloop/loopback-next/tree/master/packages/rest-explorer)
- [@loopback/typeorm](https://github.com/strongloop/loopback-next/tree/master/extensions/typeorm)
Refer to the list of [official components](./Component.md#Official-components)
for an idea about how different types of components are written.

### Create your own extension

Expand Down
12 changes: 6 additions & 6 deletions packages/cli/generators/extension/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ module.exports = class ExtensionGenerator extends ProjectGenerator {

scaffold() {
if (this.projectInfo) {
const titleCase =
this.projectInfo.name.charAt(0).toUpperCase() +
this.projectInfo.name.slice(1);
this.projectInfo.optionsInterface = `${titleCase}Options`;
this.projectInfo.bindingsNamespace = `${titleCase}Bindings`;
this.projectInfo.defaultOptions = `DEFAULT_${this.projectInfo.name.toUpperCase()}_OPTIONS`;
this.projectInfo.optionsInterface = `${this.projectInfo.componentName}Options`;
this.projectInfo.bindingsNamespace = `${this.projectInfo.componentName}Bindings`;
const uppercaseUnderscore = this.projectInfo.name
.toUpperCase()
.replace(/\W/g, '_');
this.projectInfo.defaultOptions = `DEFAULT_${uppercaseUnderscore}_OPTIONS`;
}
return super.scaffold();
}
Expand Down
20 changes: 15 additions & 5 deletions packages/cli/generators/project/templates/README.md.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,22 @@

## Installation

Describe the installation steps.
Install <%= project.componentName %> using `npm`;

## Basic Use
```sh
$ npm install <%= project.name %>
```

Describe the usage.
## Basic Use

## License
Configure and load <%= project.componentName %> in the application constructor
as shown below.

Specify the license.
```ts
...
this.configure(<%= project.componentName %>.COMPONENT).to({
// Put the configuration options here
});
this.component(<%= project.componentName %>);
...
```

0 comments on commit c89ee7f

Please sign in to comment.