1.0.1 • Published 5 years ago

@nkovacevic/chronos v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Chronos - Simple state management

Chronos is a simple state management library written in TypeScript, transpiled to JavaScript with Gulp. After initializing and enabling new Chronos object will start tracking history. Because object tracks its history you can take undo and redo actions on it.

USAGE

You can see the example in demo folder of this repository!

Code example:

npm i @nkovacevic/chronos
const Chronos = require('@nkovacevic/chronos');
const chrono = new Chronos();

chrono.enable();

chrono.test = 'TEST';
chrono.test = 'NEW TEST';

console.log(chrono.test); // should be NEW TEST
chrono.undo();
console.log(chrono.test); // should be TEST
chrono.redo();
console.log(chrono.test); // should be NEW TEST
chrono.undo();
console.log(chrono.test); // should be TEST

chrono.disable();

DEVELOPMENT

Chronos uses nodemon, jest and gulp for fast developing.

Make a change in your file and instantanously see your updates!

make sure you run npm ci before running these commands

Open your favorite Terminal and run these commands.

First Tab:

nodemon demo

Second Tab:

jest --watchAll --verbose

Third Tab:

gulp

Chronos uses following dev dependencies:

DEV DEPENDENCYWHAT IS IT?PACKAGE URL
JESTJavaScript testing solutionjest
NODEMONautomatically restart application when file changes in the directory are detectednodemon
DELDelete files and foldersdel
GULPAutomate and enhance your workflowgulp
GULP PLUMBERPrevent pipe breaking caused by errors from gulp pluginsplumber
GULP SOURCEMAPSInline source mapssourcemaps
GULP TYPESCRIPTA gulp plugin for handling TypeScript compilation workflowgulp typescript
GULP UGLIFYMinify JavaScript with UglifyJS3uglify
TSLINTTSLint is an extensible static analysis tool that checks TypeScript codetslint
TYPESCRIPTTypeScript is a language for application-scale JavaScripttypescript

LICENSE

MIT License LICENSE

AUTHOR

Nikola Kovacevic

Created on January 2019

1.0.1

5 years ago

1.0.0

5 years ago