Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 1.22 KB

readme.md

File metadata and controls

28 lines (21 loc) · 1.22 KB

core

Provides a database agnostic service for processing migrations in JavaScript. Read the docs for more information.

Usage

  1. Install it with npm i @js-migrations/core.
  2. Create a repository facade.
  3. Use the factory to create the service facade.
  4. Use the service facade by understanding the docs or trying one of the supported presenters.

Create a repository facade

This package contains the RepoFacade TypeScript interface. You can create a facade to match the interface using the factories below.

Use the factory

import migrationsServiceFactory from '@js-migrations/core/dist/factory';

const migrationsServiceFacade = migrationsServiceFactory({
  repo: migrationsRepoFacade,
});

Use a supported presenter

The service facade is used by the following packages that provide a presentation layer to the service.