Created October 10, 2016
- Sheyne Anderson
- CJ Dimaano
- Dyllon Gagnier
- Daniel James
Command Line Tools
Sinap-CLI provides command line tools that operate on Sinap plugins and graph files.
npm install -g sinap-cli
$ sinap-run plugins/nfa examples/SimpleNFA.sinap 111222 true
More information can be found at sinap-cli.
Building and running Sinap-IDE
Step 1: Installing npm
If you don't have npm installed, you can find it along with nodejs here:
Note: for Linux developers, it is recommended to install npm and nodejs via the package manager.
sudo apt-get install npm
You may have to enable the epel repository before you can install npm:
sudo yum install epel-release
sudo yum install npm
If your version of npm is not at least 4.2, you must update it.
Note: there are various resources across the internet for updating npm and nodejs for your flavor of OS, so no discussion will be included here.
Step 2: Installing dependencies and building
Navigate to the project root directory:
Build the vendor DLL:
npm run build:dll
Note: Every time dependencies in
vendor.tsare updated or the build directory is cleaned out, the vendor DLL must be rebuilt.
Build the project:
npm run build
It may be more convenient to have continuous building while actively coding:
npm run build:watch
This rebuilds the project any time one of the source files is changed.
Step 3: Running the development build
Run the development build with:
Note: other npm scripts exist such as
npm run build:start,
npm run clean, etc. Refer to
package.jsonfor a list of available npm scripts.
Note: cloning the Sinap-IDE repository does not come bundled with any plugins. To include some of the plugins available from 2graphic, use git submodule.
git submodule init git submodule update
Packaging Sinap-IDE requires at least nodejs 7. Check your version of nodejs before attempting to package:
If you don't have nodejs or don't have the correct version, see the notes in Step 1 of Building and running Sinap-IDE.
Package Sinap-IDE for deployment with:
This builds and packages production versions of Sinap-IDE for Linux, Mac, and Windows. To package Sinap-IDE for a particular OS, use:
node package.js PLATFORM
PLATFORM is one of
Note: it is possible to package Sinap-IDE with debugging but not recommended. Use the following to package with debugging:
node package.js PLATFORM debug
app/index.ts = Starting point for Electron application.
app/main.ts = Starting point for Angular 2 application.
app/main.module.ts = Our module for the Sinap IDE
app/vendors.ts = Import all libraries we're using. These are built into a Webpack DLL with
npm run build:dll