-
Notifications
You must be signed in to change notification settings - Fork 66
Building from source code
In case you want to make changes to CATS and want to build new versions, there are a few additional steps to perform.
Ensure that you have Git and Node.js installed.
Clone a copy of the CATS repo:
git clone https://github.com/jbaron/cats.git
Change to the cats directory:
cd cats
Install NW.js, TypeScript and the module dependencies:
npm install -g nwjs
npm install -g typescript
npm install
Then run the following to build:
npm run build
That is all. You should now have a fully functional version of CATS.
Under the hood there are two separate projects, one for the main IDE and one for the WebWorker that does all the heavy lifting. Each of them has its own tsconfig file:
- tsconfig-cats.json that contains all the configuration to compile the main IDE
- tsconfig-isense.json that contains all the configuration to compile the web worker
The npm run build
command will build both of them using tsc, however they can also be build separately if needed by just using the tsc command, for example: tsc -p tsconfig-cats.json
All the source code can be found within the src
directory and it is all plain TypeScript.
The main framework used by CATS is Qooxdoo. It is very well suited for these desktop alike applications and since it also uses an object-oriented approach, it was not too hard to generate a good declaration file for it. For sure there is a learning curve however with code completion being available and a lot of online documentation and examples, it shouldn't be too hard.
The source editor is based on the ACE editor, a fast editor that has good support for the various computer languages. Since in the latest versions of CATS we used unmodified versions of ACE, it is simple to keep up to date with the latest versions and actual required understanding of ACE is limited to the exposed API.
Lastly the TypeScript language services are used to provide things like code completion. This is all done in a webworker to keep the UI responsive. However the TypeScript language service API itself is not yet well documented by Microsoft.