@sivrad/matrix v1.0.39
Installation
yarn add @sivrad/matrix
Usage
Create Matrix Instance
// Import Matrix from this package.
import { Matrix } from '@sivrad/matrix';
// Create an instance and pass all the collections.
const mtx = new Matrix([exampleCollection]);
Get Collection
console.log(mtx.getCollection('example'));
Get a Type
console.log(mtx.getType('example.ExampleThing'));
The rest of this is meant to be used by generated code with the collection-tools
package.
Contributing
These are the steps to contribute to the Matrix Package.
Post Git Clone
Install Dependencies
Install node dependencies with yarn.
yarn
Generate Internal Types
This generates internal types from the JSON schemas from this repo.
yarn generate-types
Building the Package
This script will build the package and transpile the code to Javascript.
yarn build
Additionally, you can just build the src/types/*
files with:
yarn build-types
This is usefull if you don't want to transpile into Javascript every time you change something.
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago