Coder Social home page Coder Social logo

cerebral's Introduction

Cerebral

A state controller with its own debugger

NPM version Build status Test coverage bitHound Score Commitizen friendly Semantic Release js-standard-style Discord

Cerebral v1 is the current official release. Documentation is available at:

https://www.cerebraljs.com/.

Cerebral v2 is still a work in progress. Please head over to our cerebral v2 WIP website for more information:

https://cerebral.github.io/.

Try out Cerebral 2

To try out Cerebral 2 you can install any package with:

npm install {cerebralPackage}@next --save --save-exact

This will install the latest version of that package. New versions are automatically deployed whenever pull requests are merged into master.

When you want to update your packages you have to update all used packages in one go, for example:

npm install cerebral@next cerebral-router@next cerebral-provider-http@next --save --save-exact

Contribute

The entire Cerebral codebase has been rewritten to encourage contributions. The code is cleaned up, commented and all code is in a "monorepo". That means you can run tests across projects and general management of the code is simplified a lot.

  1. Clone the monorepo: git clone https://github.com/cerebral/cerebral.git
  2. In root: npm install
  3. Run npm run setup which will build code and bootstrap it together

The packages are located under packages folder and there is no need to run npm install for each package.

Using monorepo for your own apps

If you want to use Cerebral 2 directly from your cloned repo, you can create a symlink to the packages/cerebral directory into the node_modules directory of your app.

If your app and the cerebral monorepo are in the same folder you can do from inside your app directory:

$ ln -s ../../cerebral/packages/cerebral/ node_modules/

Similar you can link other packages from the packages directory into your app's node_modules folder.

Just remember to unlink the package before installing it from npm:

$ unlink node_modules/cerebral

Running demos

Go to the respective packages/some-demo-folder and run npm start

Testing

You can run all tests in all packages from root:

npm test

Or you can run tests for specific packages by going to package root and do the same:

npm test

Changing the code

When you make a code change you should create a branch first. When the code is changed and backed up by a test you can commit it from the root using:

npm run commit

This will give you a guide to creating a commit message. Then you just push and create a pull request as normal on Github.

cerebral's People

Contributors

christianalfoni avatar guria avatar maxfrigge avatar henri-hulski avatar gaspard avatar fopsdev avatar edgesoft avatar yusufsafak avatar saulshanabrook avatar fvgoto avatar garth avatar hipertracker avatar schotime avatar abalmos avatar itflies avatar julio-saito-linx avatar bfitch avatar byscripts avatar a-s-o avatar menberg avatar psypersky avatar aguilera51284 avatar cymen avatar emax093 avatar etienne-dldc avatar jtasek avatar idream3 avatar markuplab avatar nikek avatar letsgetrandy avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.