This is a guide for developers of this project.
Here is a brief overview of how to setup for this project:
-
Use
nvm
to install correct Node.js version (currently 6.2.2)nvm install x.x.x nvm use x.x.x
-
Install platform dependencies. These are unique to each platform and are implicitly covered in the different CLI install guides
-
Install app dependencies
cd bean-sdk-node npm install
-
Open project in WebStorm and begin developing!
-
Configure to use ECMAScript 6
Preferences > Languages & Frameworks > JavaScript > (Dropdown choose ECMA6)
-
Turn off unterminated line ending inspection
Preferences > Editor > Inspections > Code Style Issues > (Uncheck unterminated endings box)
-
Enable Node core libraries
Preferences > Languages & Frameworks > Node.js & NPM > (Enable node core libraries)
-
Configure the correct Node.js interpreter
Preferences > Languages & Frameworks > Node.js & NPM > (Dropdown choose NVM install)
Before you begin:
-
Make sure you have an
npm
account. -
Make sure you have private and public remotes setup in git. Usually
origin
is private andpublic
is public.git remote add public [email protected]:PunchThrough/bean-sdk-node.git
Steps:
-
Merge all feature branches to
master
-
Update
CHANGELOG.md
for new version -
Update version number in
package.json
-
Optional: Update
bean-arduino-core
if there is a new version.-
Check out bean-arduino-core at a given tag.
-
Run the bundle script and copy it over to this project:
python scripts/bundle.py cp bean-arduino-core/tmp/bean-arduino-core-x.x.x.tar.gz src/resources/
-
Delete the old bean-arduino-core tarball from src/resources
-
-
Optional: Update
bean-firmware
if there is a new version.-
Find the latest release on Confluence
-
Unzip the release
-
Copy the following files to
src/resources/firmware_bundles/bean/
*_a_BeanSmallImgAPadded.bin
*_b_Bean_imgB_large.bin
*_c_BeanSmallImgA.bin
*_a_BeanSmallImgB.bin
-
Copy the following files to
src/resources/firmware_bundles/beanplus/
*_b_BeanPlus_imgB_large.bin
*_c_BeanPlusSmallImgA.bin
-
-
Make a new commit/PR containing the following changes:
- Updated CHANGELOG
- Updated version in
package.json
- Optional: Updated bean-arduino-core
- Optional: Updated bean-firmware
-
Review and merge to master
-
Checkout master and tag release:
git tag -a <version>
-
Push to public and private repos
git push origin master --tags
git push public master --tags
- Build app:
npm run build
- Login to npm:
npm login
- Publish:
npm publish