Skip to content

Commit

Permalink
Apparently the .d.ts wasn't exposed
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneCypher committed Apr 24, 2020
1 parent 4760725 commit b6783c3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
34 changes: 14 additions & 20 deletions README.md
@@ -1,32 +1,26 @@
# jssm

Wouldn't it be nice if your state machines were simple and readable?
Wouldn't it be nice if your Javascript state machines were simple and readable?

```fsl
Green => Yellow => Red => Green;
[Red Yellow Green] ~> Off -> Red;
```

What if that were easy to render visually?
```javascript
import { sm } from 'jssm';

![](https://raw.githubusercontent.com/StoneCypher/jssm/master/src/assets/doc%20light%20unstyled.png)
const Machine = sm`
Green => Yellow => Red => Green;
[Red Yellow Green] ~> Off -> Red;
`;

And what if that in turn were easy to style?
console.log( Machine.state() ); // 'Green'

```fsl
arrange [Green Yellow];
state Red : { background-color: pink; corners: rounded; };
state Yellow : { background-color: #ffb; corners: rounded; };
state Green : { background-color: lightgreen; corners: rounded; };
Machine.transition('Yellow'); // true
console.log( Machine.state() ); // 'Yellow'

state Off : {
background-color : steelblue;
text-color : white;
shape : octagon;
};
Machine.transition('Blue'); // false
console.log( Machine.state() ); // 'Yellow'
```

What if that were easy to render visually, with styling?

![](https://raw.githubusercontent.com/StoneCypher/jssm/master/src/assets/doc%20light%20styled.png)


Expand Down
3 changes: 2 additions & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "jssm",
"version": "5.32.16",
"version": "5.32.17",
"engines": {
"node": ">=6.0.0"
},
Expand All @@ -19,6 +19,7 @@
"description": "A Javascript finite state machine (FSM) with a terse DSL and a simple API. Well tested, and typed with Flowtype. MIT License.",
"main": "dist/jssm.es5.cjs.js",
"module": "dist/es6/jssm.js",
"types": "dist/jssm.d.ts",
"scripts": {
"test": "npm run make && npm run justtest",
"rmgenerated": "rm -f src/js/jssm-dot.ts && rm -f src/js/version.ts && rm -f *.d.ts",
Expand Down

0 comments on commit b6783c3

Please sign in to comment.