da-trader-net-rx

Layer above trader-net api Exposes Rx streams.

Usage no npm install needed!

<script type="module">
  import daTraderNetRx from 'https://cdn.skypack.dev/da-trader-net-rx';
</script>

README

da-trader-net-rx

Build Status

Layer above trader-net api Exposes Rx streams.

Contains typeScript defintion files.

Documentation

Build

Problem - currently there is no adopted solution to build type-script definition file for node module. See it here :

Current solution Customized build proccess

  • Build js lib separately as is.
    • Remove all ///<reference ... tags from output
  • Build type definition file from template
    • Build definition files as is
    • Concatenate them all in single file
    • Remove all ///<reference ... tags and import from output
    • Insert output entry into template index.tmpl.d.ts file
    • Replace declare export ... to export ...

Test

Set up uri for test db

  • In .npmrc set SOME_URI=xxx, higest priority
  • In package.json field config.SOME_URI

Run test

Test must be run on empty trader-net account (no pervious trades)

npm test

If wanna use with travis don't forgate to add service to services in .travis.yml file.

Development

Project contians tasks file for Visual Studio Code

  • Build - run build:module, same as npm run-task build
  • Test - run mocha, same as npm test, same as gulp test
  • Watch build gulp

For some reason VS Code take quite a time to start build, usually watch rebuild proccess via gulp work much faster.

This way use gulp in console and then run test task manually, when neccessary.

Documentation

Generate typedoc ./src/**.ts ./src/**/**.ts

To publish docs on github

git checkout --orphan gh-pages
git add --all .
git commit -am "first commit"
git push origin gh-pages