Skip to content

devinit/datahub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Codacy Badge Dependency Status codecov

Installation

 npm install

Scripts/Commands

  • npm run pull fetches updates from the CMS and syncs the appropriate project files. Be sure to specify the correct API URL, otherwise you may pull incorrect data.

TODO:


  • Maybe replace redux with unistore
  • Use greenlet for webworkers --> didnt pan out well
  • Explore purgecss for css optimisation --> need to carry out some tests
  • Explore reactpot for further perf

Important Points / guides


  • Develop from a unix OS (MacOs , ubuntu etc). I dont plan to add windows support.

  • Prefer to use vscode, it has very good typescript support.

  • We are building on top of next.js see next.config.js for configs.

  • npm run build-fragment to build out a fragment json for grapqhl union types

  • we use npm config variables to prefill some global constants such as the API et la see for more

  • In dev mode we run a nodemon process, it sometimes doesnt die when you cntrl-c. You could use lsof -i tcp:4444 to find its PID and then kill it with kill -9 <PID>.

Cypress testing

  • check out the apps cypress dashboard here)
  • You need to have run npm run build:next before running the cypress-open command. Checkout the readme file in cypress directory for more.

Pain Points / issues

  • Currently stack with npm instead of yarn. The thing with installing with yarn, is that the charts library will stop working well for some charts. This may have to do with the way npm installs dependencies vs yarn.

  • For some reason cypress tests fail on travis. Temporary measure is to have them run on the git push pre hook.