Developing SDK

Here are the commands you need when developing the SDK:

Install dependencies:

$ yarn install

Build the package:

$ yarn run build

Run tests:

$ yarn test

Run linter:

$ yarn run lint

Format code (run Prettier):

$ yarn run format

Serve the docpress docs

$ yarn run serve-docs

Build the docpress docs

$ yarn run build-docs

Update the Github Pages

$ yarn run build-docs
$ mv _docpress ../
$ git checkout gh-pages
$ cp -r ../_docpress/* ./
$ rm -r ../_docpress
$ // git add, commit, push

Release a new version to NPM

  1. Update version in package.json and src/version.js

  2. Update CHANGELOG.md

    • Move everything in Unreleased to the corresponding version section
  3. Login as sharetribe with npm login

    • check credentials from password manager
  4. Publish with npm publish

  5. Add a new tag

    git tag -a v1.2.3 -m v1.2.3
    
  6. Update latest tag

    git push origin :refs/tags/latest
    git tag -f -a latest -m latest
    
  7. Push the tag

    git push --tags
    
  8. Go to Github releases and draft a new release

    Use the following content:

    Tag version: <the newly created tag>

    Release title: <version number>

    Describe this release:

    <copy the content from the [CHANGELOG.md](CHANGELOG.md)>
    

    Here's a full example:

    Tag version: v1.2.3

    Release title: v1.2.3

    Describe this release:

    ### Added
    
    - Added many things
    
    ### Changed
    
    - Changed this and that
    
  9. Announce the new version in Slack