https://2graphic.github.io/
Created October 10, 2016
Founded by:
- Sheyne Anderson
- CJ Dimaano
- Dyllon Gagnier
- Daniel James
Sinap-CLI provides command line tools that operate on Sinap plugins and graph files.
Installing Sinap-CLI:
npm install -g sinap-cli
Sinap-CLI example:
$ sinap-run plugins/nfa examples/SimpleNFA.sinap 111222
true
More information can be found at sinap-cli.
Sinap-IDE is developed using Typescript, Angular4, and npm. Make sure you have npm version 4.2 or greater installed:
npm -v
If you don't have npm installed, you can find it along with nodejs here:
https://nodejs.org/en/download/
Note: for Linux developers, it is recommended to install npm and nodejs via the package manager.
Debian userssudo apt-get install npm
Fedora/CentOS users
You may have to enable the epel repository before you can install npm:sudo yum install epel-release
Install npm:
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.
Navigate to the project root directory:
cd /path/to/sinap-ide
Install dependencies:
npm install
Build the vendor DLL:
npm run build:dll
Note: Every time dependencies in
vendor.ts
are 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.
Run the development build with:
npm start
Note: other npm scripts exist such as
npm run build:start
,npm run clean
, etc. Refer topackage.json
for 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:
node -v
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:
node package.js
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
where PLATFORM
is one of linux
, win32
(Windows), darwin
(OSX), mas
, or all
(default).
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