Skip to content

Build instructions

Vilius edited this page Aug 5, 2021 · 1 revision

This project use "npm". Npm helps to install (npm install) or update (npm update) all libraries using simple commands.

Requirements

  • npm - package manager, helps to manage dependencies. Update it to latest version using npm install npm@latest -g.

Build instructions

  • git clone https://github.com/midzer/tobii.git
  • cd tobii
  • npm install - it will install all dependencies from package.json file into node_module folder
  • There are 2 ways to edit files:
    • Run npm run dev-modern - it automatically re-build dist/tobii.module.js when source changes. Run command, edit files and test using demo/modern.html. Recommended way.
    • Edit files and run npm run build command to rebuild all dist/* files.

To generate minified code for production, run npm run build. Code is build using "Microbundle".

Useful commands

  • npm install - installs all modules that are listed on package.json file and their dependencies..
  • npm update - updates all packages in the node_modules directory and their dependencies..
  • npm run - list all possible npm run commands. (help)
  • npm run build - rebuilds all dist/* files.
  • npm run dev - rebuilds only dist/tobii.js.
  • npm run dev-modern - rebuilds only dist/tobii.module.js. Can be used with demo/modern.html.
  • npm run lint - validates src/* code using "eslint".
Clone this wiki locally