0.2.2 • Published 7 months ago

@neuledge/typescript-states v0.2.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 months ago

Neuledge Typescript States

A TypeScript code generator for Neuledge Engine "*.states" files.

This library is not intended to be used directly. It is a dependency of the main package.

📦 Installation

npm install @neuledge/typescript-states

🚀 Getting started

import { generate } from '@neuledge/typescript-states';
import { StatesContext } from '@neuledge/states';
import { promises as fs } from 'fs';

// create a state context and load a state file
const ctx = new StatesContext();
await ctx.load([{
  source: await fs.readFile('posts.states', { encoding: 'utf8' }),
  filePath: 'posts.states',
}]);

// generate TypeScript code from the state context
await fs.writeFile('states.generated.ts', generate(ctx));

📄 License

Neuledge is Apache 2.0 licensed.

0.2.2

7 months ago

0.1.0

1 year ago

0.2.1

1 year ago

0.1.2

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.3

1 year ago

0.1.0-alpha.0

1 year ago