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

docs: add description of packages for the monorepo #1005

Merged
merged 1 commit into from
Feb 15, 2018
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
67 changes: 67 additions & 0 deletions MONOREPO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# loopback-next

The [loopback-next](https://github.com/strongloop/loopback-next) repository uses
[lerna](https://lernajs.io/) to manage multiple packages for LoopBack 4.

## Packages

| Package | npm | Description |
|-----------------------------------------------------------|-------------------------------|---------------------------|
|[build](packages/build) |@loopback/build | A set of common scripts and default configurations to build LoopBack 4 or other TypeScript modules |
|[testlab](packages/testlab) |@loopback/testlib | A collection of test utilities we use to write LoopBack tests |
|[cli](packages/cli) |@loopback/cli | CLI for LoopBack 4 |
|[metadata](packages/metadata) |@loopback/metadata | Utilities to help developers implement TypeScript decorators, define/merge metadata, and inspect metadata |
|[context](packages/context) |@loopback/context | Facilities to manage artifacts and their dependencies in your Node.js applications. The module exposes TypeScript/JavaScript APIs and decorators to register artifacts, declare dependencies, and resolve artifacts by keys. It also serves as an IoC container to support dependency injection. |
|[core](packages/core) |@loopback/core | Define and implement core constructs such as Application and Component |
|[openapi-spec](packages/openapi-spec) |@loopback/openapi-spec | TypeScript type definitions for OpenAPI Spec/Swagger documents |
|[openapi-spec-builder](packages/openapi-spec-builder) |@loopback/openapi-spec-builder | Builders to create OpenAPI (Swagger) specification documents in tests |
|[openapi-v2](packages/openapi-v2) |@loopback/openapi-v2 | Decorators that annotate LoopBack artifacts with OpenAPI v2 (Swagger) metadata and utilities that transform LoopBack metadata to OpenAPI v2 (Swagger) specifications|
|[rest](packages/rest) |@loopback/rest | Expose controllers as REST endpoints and route REST API requests to controller methods |
|[repository](packages/repository) |@loopback/repository | Define and implement a common set of interfaces for interacting with databases|
|[repository-json-schema](packages/repository-json-schema) |@loopback/repository-json-schema| Convert a TypeScript class/model to a JSON Schema |
|[authentication](packages/authentication) |@loopback/authentication | A component for authentication support |
|[example-hello-world](packages/example-hello-world) | | A simple hello-world application using LoopBack 4 |
|[example-getting-started](packages/example-getting-started)| | A basic tutorial for getting started with Loopback 4 |
|[example-log-extension](packages/example-log-extension) | | An example showing how to write a complex log extension for LoopBack 4 |
|[example-rpc-server](packages/example-rpc-server) | | An example RPC server and application to demonstrate the creation of your own custom server |

## Working with the repository

We use npm scripts declared in [package.json](package.json) to work with the
monorepo managed by lerna.

### Set up the project
```sh
git clone https://github.com/strongloop/loopback-next.git
cd loopback-next
npm run bootstrap
```

### Common tasks

| Task | Command | Description |
|------------------|-----------------------|-------------|
|Bootstrap packages|`npm run bootstrap` |Install npm dependencies for all packages and create symbolic links for intra-dependencies. It's required for the initial setup or the list of packages is changed |
|Build packages |`npm run build` |Transpile TypeScript files into JavaScript |
|Run tests |`npm test` |Clean, build, run mocha tests, and perform lint checks |
|Fix lint issues |`npm run lint:fix` |Fix lint issues, including tslint rules and prettier formatting |

### Build a release

When we are ready to tag and publish a release, run the following commands:
```sh
cd loopback-next
git checkout master
git pull
npm run release
```

The `release` script will automatically perform the tasks for all packages:

- Clean up `node_modules`
- Install/link dependencies
- Transpile TypeScript files into JavaScript
- Run mocha tests
- Check lint (tslint and prettier) issues

If all steps are successful, it prompts you to publish packages into npm repository.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ LoopBack makes it easy to build modern applications that require complex integra
- Define your data and endpoints with OpenAPI
- No maintenance of generated code

# Work with this repository

This repository uses [lerna](https://lernajs.io/) to manage multiple packages/modules
for LoopBack 4. Please see [MONOREPO.md](MONOREPO.md) for instructions to work with this monorepo.

# Status: Developer Preview #1

LoopBack 4 is a work in progress, the public API is frequently changed in
Expand Down Expand Up @@ -82,6 +87,7 @@ See [all contributors](https://github.com/strongloop/loopback-next/graphs/contri

# Contributing

- [Working with this repository](MONOREPO.md)
- [Guidelines](https://github.com/strongloop/loopback-next/wiki/Contributing#guidelines)
- [Join the team](https://github.com/strongloop/loopback-next/issues/110)

Expand Down