Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 1.72 KB

development.md

File metadata and controls

65 lines (46 loc) · 1.72 KB

OpenKit - JavaScript Development

Prerequisites

Node.js

Windows

On Windows machine, go to Node.js download or use nvm for Windows to be able to easily switch between Node.js versions. After that, execute on PowerShell with Administration privileges (Run as administrator):

npm install -g --production windows-build-tools

Linux

On Linux machine, you can install n tool, which does pretty much the same like nvm but in a more convenient way.

Yarn package manager

sudo npm install -g yarn

Install dependencies

yarn install

Building the .js library

yarn build                  # Build browser and node.js library
yarn build:node             # Build the node.js library
yarn build:browser          # Build the browser library
yarn build:browser:dev      # Build the browser library in dev mode
yarn build:browser:dev -w   # Build and watch the browser library in dev mode

Building the documentation

yarn docs           # Build the docs in html format
yarn docs:markdown  # Build the docs in markdown format

Generated files

  • dist/browser the library for the browser in a bundle.js
  • dist/node the library for Node.JS
  • dist/types the definition files for usage with TypeScript.
  • build/coverage the coverage information of the tests
  • docs the generated tsdocs in markdown or html

Other commands

Command Description
yarn lint Run tslint
yarn lint:spec Run tslint
yarn test Run tests with coverage