Tidepool data visualization for diabetes device data.
This README is focused on just the nuts & bolts of getting the code in this repository ready to develop locally in blip or with React Storybook. For more detailed information about the code in this repository, please see the developer guide.
After cloning this repository to your local machine, first make sure that you have a version of
npm that is recent enough - at least
3.x. We are still using node
0.12.x for our engine, and a
3.x version of
npm does not get installed by default if you are installing node
0.12.x through a mechanism like
nvm. In this case, you will need to manually update with:
$ npm install -g npm
Then, install the dependencies:
$ npm install
To work on code in this repository within blip, first do the following from your local blip repository (assuming blip/ and viz/ are sister directories):
$ npm link ../viz/
In this repository, start the build in watch mode:
$ npm start
Finally, back in your local blip repository, follow the instructions for starting blip locally.
If you're working at the component or view level outside of blip, you can work on component and view rendering code with React Storybook. Just start up the storybook with:
$ npm run storybook
$ npm test
To have the tests run continuously with source and test code changes rebundled as you work:
$ npm run test-watch
To run the unit tests in your local Chrome browser (recommended for Tidepool developers before merging or publishing a release):
$ npm run browser-tests
To run the code linter from the command line:
$ npm run lint
When a new feature(s) is/are complete (i.e., branch is synchronized with master, reviewed with a sign-off from another developer), it's time to publish the package to npm! Since this is one of our most recently created repositories, any member of the "developers" team in the
@tidepool npm organization will be able to publish the package using his or her npm login. Steps to publishing are as follows:
mversiontool with the
-moption to auto-commit the version bump and tag (e.g.,
$ mversion patch -mfor a patch version bump)
$ git push origin <branch-name>and
$ git push origin --tags
$ npm whoamito check if you are logged in as yourself; if you are, skip to 8.
tidepool-robot, log out with
$ npm logout
$ npm login
$ npm publish; before the actual publish happens, the linter, tests, and packaging webpack build will run since we have set those up through the
prepublishnpm hook in the package.json
@tidepool/vizas a dependency!