@gobstones/gobstones-core
TypeScript icon, indicating that this package has built-in type declarations

0.5.1 • Public • Published

gobstones-core

A set of utility types, interfaces and classes that are used through all the Gobstones Platform repositories.

Licence Version

API Docs

GitHub Workflow Tests GitHub Workflow Build

Install

Install with npm by using

npm install @gobstones/gobstones-core

Usage

Unless you are developing a library for the Gobstones Platform you probably won't need to use this library directly, as many of the elements in this library are re-exported by other tools. If you are however interesting in using this library directly or you are effectively developing things in the Gobstones Platform, there are several ways how you can use this library.

Main module

The main module is @gobstones/gobstones-core and contains useful classes and abstraction to most code usage in Gobstones. Currently some of the exported utilities are:

  • Board related classes and interfaces (Board, Cell, Color, Direction)
  • Expectations (The expect function and all it's associated matchers)
  • Translator (Mainly the translator class and it's associated behavior)
  • SourceReader (A class to solve the problem of locating characters in source input)
  • helper tools (Such as a tool for creating matrices, a deepEqual comparison, and tools to flatten/unflatten an object)

Just import then from the main module the tools you want. Check the API for more information on what is exported and how it works.

import { Board } from '@gobstones/gobstones-core';
import { expect } from '@gobstones/gobstones-core';
import { SourceInput, SourceReader } from '@gobstones/gobstones-core';

CLI Module

The CLI module provides tools for constructing a CLI application. It resides on the /cli submodule. It exports mainly the cli type and function. Import it as follows:

import { cli } from '@gobstones/gobstones-core/cli';

Contributing

See our Contributions Guidelines to contribute.

Package Sidebar

Install

npm i @gobstones/gobstones-core

Weekly Downloads

70

Version

0.5.1

License

AGPL-3.0

Unpacked Size

2.32 MB

Total Files

474

Last publish

Collaborators

  • nicolas-alv3
  • alanrodas
  • sawady