Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Declarative state and side effects management for popular JavaScript frameworks

License

NotificationsYou must be signed in to change notification settings

christianalfoni/cerebral

 
 

Repository files navigation

A declarative state and side effects management solution for popular JavaScript frameworks

NPM versionBuild statusCoverage StatusbitHound ScoreCommitizen friendlyDiscord

Documentation

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

The packages are located underpackages folder and there isno need to runnpm 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 symlinks for followingdirectories into thenode_modules directory of your app:

  • packages/node_modules/cerebral
  • packages/node_modules/function-tree
  • packages/node_modules/@cerebral

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

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

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

$ unlink node_modules/cerebral# ...

Running demos

Go to the respectivepackages/demos/some-demo-folder and runnpm 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 fromthe 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.

Release process

  • Review and merge PRs intonext branch. It is safe to use "Update branch", the commit created by Github will not be part ofnext history
  • If changes torepo-cooker, clean Travis NPM cache
  • From command line:
$ git checkout next$ git pull$ npm install# make sure any new dependencies are installed$ npm install --no-save repo-cooker# needed to test release, make sure you have latest$ npm run release# and check release notes$ git checkout master$ git pull$ git merge next$ git push

About

Declarative state and side effects management for popular JavaScript frameworks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript83.8%
  • CSS14.6%
  • HTML1.6%

[8]ページ先頭

©2009-2025 Movatter.jp