midzer/tobii

Missing build instructions

Closed this issue · 4 comments

"npm run dev" works, but it only builds tobii.js.
"npm run build" throws "'BROWSERSLIST_ENV' is not recognized as an internal or external command,"

What are requirements? NPM only?

What is procedure to get working environment? is this correct?

git clone ***
cd ***
npm install
npm run build

npm run build works for me.
I'm using npm 7.5.2 and node v12.21.0.

Are you on windows?

  1. To make build work on Windows, you need:
  • run npm install --save-dev cross-env command
  • replace BROWSERSLIST_ENV to cross-env BROWSERSLIST_ENV on package.json

After that, build works on Windows and unix/mac (tested).

  1. Still can not figure out what to do with npm run dev:
  • dist/*.css is not updated, only dist/tobi.js
  • demo with dist/tobii.js does not work: module is not defined && Tobii is not defined

2nd problem fixed using microbundle watch --raw and demo/modern.html.
So what is purpose of microbundle watch --raw --format cjs ?

You have to write build instructions, first build takes too much time alone to make it work.

@midzer It would be good to enable wiki (read only) and create Building instructions article, and link it on readme.MD
You can also add contribution guide.