Skip to content

cs-au-dk/ReaGenT

Folders and files

NameName
Last commit message
Last commit date
Jan 22, 2019
Jan 18, 2019
Nov 23, 2017
Jun 12, 2018
Jul 29, 2019
Jun 22, 2019
Jul 29, 2019
Jan 23, 2019
Oct 29, 2019
May 2, 2018
Nov 24, 2017
Jan 24, 2019
Feb 25, 2019
Jan 18, 2019
Jan 17, 2018
May 15, 2017
Jan 22, 2019
Jan 22, 2019
Jun 12, 2018
Sep 19, 2017
Jul 5, 2018

Repository files navigation

ReaGenT / TSTest

A tool for verifying and testing the correctness of TypeScript declaration files.

Setting up the project

  • The project and have been tested on Windows/Mac/Linux and should run on all platforms where the dependencies can be installed.

  • Dependencies:

    • Git (to download submodules) sudo apt-get install git
    • NodeJS sudo apt-get install nodejs npm
    • JDK 9 (or higher) sudo add-apt-repository ppa:linuxuprising/java && sudo apt-get install oracle-java11-installer
    • Chrome (see below)
    • Istanbul (only for coverage tests with TSTest) npm install -g istanbul
  • Getting the submodules git submodule update --init --recursive
    (this can take several minutes, look if there is network activity if you think it might be stuck)

  • Set up ts-spec-reader:

    • cd ts-spec-reader
    • npm install
    • npm run compile
    • cd ..
  • Compile the project

    • On Mac/Unix: ./gradlew fatJar
    • On Windows: ./gradlew.bat fatJar

Running some TSTest benchmarks requires installing Chrome: https://www.google.com/chrome/
An additional package is needed on Ubuntu for the Chrome integration: sudo apt -y install libgconf2-4

Running ReaGenT / TSTest

In the below I'm going to assume that a unix-like system is used, replace main.sh with main.bat for Windows.

  • Doing a quick test that the setup worked.
    • ./main.sh quicktest
  • View a help message
    • ./main.sh
  • Running ReaGenT on a predefined benchmark.
    • ./main.sh reagent -bench classnames
  • Running ReaGenT on a JavaScript implementation and TypeScript declaration
    • ./main.sh reagent -js test/benchmarks/classnames/classnames.js -ts test/benchmarks/classnames/classnames.d.ts
  • Running TSTest on a predefined benchmark
    • ./main.sh tstest -bench classnames
  • Running TSTest on a JavaScript implementation and TypeScript declaration (in a browser environment)
    • ./main.sh tstest -js test/benchmarks/js-cookie/js-cookie.js -ts test/benchmarks/js-cookie/declaration.d.ts -env browser