chore(project): update setup instructions

Closes #318
This commit is contained in:
pedesen 2015-09-29 11:45:41 +02:00 committed by Ricardo Matias
parent 8a0f566ee3
commit 28cec5d44e
4 changed files with 12 additions and 181 deletions

View File

@ -5,12 +5,12 @@ This document describes the necessary steps to setup a `bpmn-js` development env
## TLDR;
On Linux/Unix? [git](http://git-scm.com/), [NodeJS](nodejs.org) and [npm](https://www.npmjs.org/doc/cli/npm.html) ready? Check out the [setup script section](https://github.com/bpmn-io/bpmn-js/blob/master/docs/project/SETUP.md#setup-via-script) below.
On Linux, OS X or Windows? [git](http://git-scm.com/), [NodeJS](nodejs.org) and [npm](https://www.npmjs.org/doc/cli/npm.html) ready? Check out the [setup script section](https://github.com/bpmn-io/bpmn-js/blob/master/docs/project/SETUP.md#setup-via-script) below.
## Manual Steps
Make sure you have [git](http://git-scm.com/), [NodeJS](nodejs.org) and [npm](https://www.npmjs.org/doc/cli/npm.html) installed before you continue.
Make sure you have [git](http://git-scm.com/), [NodeJS](nodejs.org), [npm](https://www.npmjs.org/doc/cli/npm.html) and [Grunt](http://gruntjs.com/getting-started) installed before you continue.
### Get Project + Dependencies
@ -20,47 +20,37 @@ The following projects from the [bpmn-io](https://github.com/bpmn-io) project on
* [bpmn-js](https://github.com/bpmn-io/bpmn-js)
* [diagram-js](https://github.com/bpmn-io/diagram-js)
* [bpmn-moddle](https://github.com/bpmn-io/bpmn-moddle)
* [moddle](https://github.com/bpmn-io/moddle)
* [moddle-xml](https://github.com/bpmn-io/moddle-xml)
and clone them into a common directory via
```
git clone git@github.com:bpmn-io/PROJECT_NAME.git
git clone git@github.com:bpmn-io/bpmn-js.git
git clone git@github.com:bpmn-io/diagram-js.git
git clone git@github.com:bpmn-io/bpmn-moddle.git
```
### Link Projects
[Link dependent projects](http://blog.nodejs.org/2011/04/06/npm-1-0-link/) between each other to pick up changes immediately.
[Link dependent projects](https://docs.npmjs.com/cli/link) between each other to pick up changes immediately.
```
.
├─bpmn-js
│ └─node_modules
│ ├─diagram-js <link>
│ ├─moddle <link>
│ └─bpmn-moddle <link>
├─bpmn-moddle
│ └─node_modules
│ ├─moddle <link>
│ └─moddle-xml <link>
├─diagram-js
├─moddle
└─moddle-xml
└─node_modules
└─moddle <link>
├─bpmn-moddle
```
#### On Linux
#### On OS X, Linux
Use [npm-link](https://www.npmjs.org/doc/link.html) or `ln -s <target> <link>`.
Use [npm-link](https://docs.npmjs.com/cli/link) or `ln -s <target> <link>`.
#### On Windows
Use `mklink /d <link> <target>` [(docs)](http://technet.microsoft.com/en-us/library/cc753194.aspx).
### Install Dependencies
Execute `npm install` on each of the projects to grab their dependencies.
@ -73,4 +63,4 @@ Execute `grunt` on each project. Things should be fine.
## Setup via Script
The whole setup can be automated through setup scripts for [Linux](https://github.com/bpmn-io/bpmn-js/blob/master/docs/project/setup.sh) and [Windows](https://github.com/bpmn-io/bpmn-js/blob/master/docs/project/setup.bat).
The whole setup can be automated through setup scripts for [Linux/OS X](https://github.com/bpmn-io/bpmn-js/blob/master/docs/project/setup.sh) and [Windows](https://github.com/bpmn-io/bpmn-js/blob/master/docs/project/setup.bat).

View File

@ -9,13 +9,8 @@ base=`pwd`
echo cloning repositories
git clone git@github.com:bpmn-io/diagram-js.git
git clone git@github.com:bpmn-io/diagram-js-direct-editing.git
git clone git@github.com:bpmn-io/moddle.git
git clone git@github.com:bpmn-io/moddle-xml.git
git clone git@github.com:bpmn-io/bpmn-js.git
git clone git@github.com:bpmn-io/bpmn-js-cli.git
git clone git@github.com:bpmn-io/bpmn-moddle.git
git clone git@github.com:bpmn-io/ids.git
echo done.
@ -26,40 +21,9 @@ cd $base/diagram-js
npm install
echo setup moddle
cd $base/moddle
npm install
echo setup moddle-xml
cd $base/moddle-xml
mkdir node_modules
ln -s $base/moddle node_modules/moddle
npm install
echo setup bpmn-moddle
cd $base/bpmn-moddle
mkdir node_modules
ln -s $base/moddle node_modules/moddle
ln -s $base/moddle-xml node_modules/moddle-xml
npm install
echo setup diagram-js-direct-editing
cd $base/diagram-js-direct-editing
mkdir node_modules
ln -s $base/diagram-js node_modules/diagram-js
npm install
echo setup ids
cd $base/ids
npm install
@ -67,23 +31,11 @@ echo setup bpmn-js
cd $base/bpmn-js
mkdir node_modules
ln -s $base/moddle node_modules/moddle
ln -s $base/bpmn-js-cli node_modules/bpmn-js-cli
ln -s $base/bpmn-moddle node_modules/bpmn-moddle
ln -s $base/diagram-js node_modules/diagram-js
ln -s $base/diagram-js-direct-editing node_modules/diagram-js-direct-editing
ln -s $base/ids node_modules/ids
npm install
echo setup bpmn-js-cli
cd $base/bpmn-js-cli
mkdir node_modules
ln -s $base/bpmn-js node_modules/bpmn-js
npm install
cd $base
echo all done.
echo all done.

View File

@ -9,13 +9,8 @@ set BASE=%CD%
echo cloning repositories
git clone git@github.com:bpmn-io/diagram-js.git
git clone git@github.com:bpmn-io/diagram-js-direct-editing.git
git clone git@github.com:bpmn-io/moddle.git
git clone git@github.com:bpmn-io/moddle-xml.git
git clone git@github.com:bpmn-io/bpmn-js.git
git clone git@github.com:bpmn-io/bpmn-js-cli.git
git clone git@github.com:bpmn-io/bpmn-moddle.git
git clone git@github.com:bpmn-io/ids.git
echo done.
@ -26,59 +21,19 @@ cd %BASE%\diagram-js
npm install
echo setup moddle
cd %BASE%\moddle
npm install
echo setup moddle-xml
cd %BASE%\moddle-xml
mkdir node_modules
mklink /D %BASE%\moddle-xml\node_modules\moddle %BASE%\moddle
npm install
echo setup bpmn-moddle
cd %BASE%\bpmn-moddle
mkdir node_modules
mklink /D %BASE%\bpmn-moddle\node_modules\moddle-xml %BASE%\moddle-xml
mklink /D %BASE%\bpmn-moddle\node_modules\moddle %BASE%\moddle
npm install
echo setup diagram-js-direct-editing
cd %BASE%\diagram-js-direct-editing
mkdir node_modules
mklink /D %BASE%\diagram-js-direct-editing\node_modules\diagram-js %BASE%\diagram-js
npm install
echo setup ids
cd %BASE%\ids
npm install
echo prepare setup bpmn-js
rem link bpmn-js <> bpmn-js-cli (circular dev dependency)
mkdir %BASE%\bpmn-js\node_modules
mkdir %BASE%\bpmn-js-cli\node_modules
rem link bpmn-js
mklink /D %BASE%\bpmn-js\node_modules\bpmn-moddle %BASE%\bpmn-moddle
mklink /D %BASE%\bpmn-js\node_modules\diagram-js %BASE%\diagram-js
mklink /D %BASE%\bpmn-js\node_modules\diagram-js-direct-editing %BASE%\diagram-js-direct-editing
mklink /D %BASE%\bpmn-js\node_modules\bpmn-js-cli %BASE%\bpmn-js-cli
mklink /D %BASE%\bpmn-js\node_modules\ids %BASE%\ids
rem link bpmn-js-cli
mklink /D %BASE%\bpmn-js-cli\node_modules\bpmn-js %BASE%\bpmn-js
echo setup bpmn-js
@ -87,10 +42,4 @@ cd %BASE%\bpmn-js
npm install
echo setup bpmn-js-cli
cd %BASE%\bpmn-js-cli
npm install
cd %BASE%
cd %BASE%

View File

@ -9,14 +9,8 @@ base=`pwd`
echo cloning repositories
git clone git@github.com:bpmn-io/diagram-js.git
git clone git@github.com:bpmn-io/diagram-js-direct-editing.git
git clone git@github.com:bpmn-io/moddle.git
git clone git@github.com:bpmn-io/moddle-xml.git
git clone git@github.com:bpmn-io/bpmn-js.git
git clone git@github.com:bpmn-io/bpmn-js-integration.git
git clone git@github.com:bpmn-io/bpmn-js-cli.git
git clone git@github.com:bpmn-io/bpmn-moddle.git
git clone git@github.com:bpmn-io/ids.git
echo done.
@ -28,41 +22,9 @@ npm install
npm link
echo setup moddle
cd $base/moddle
npm install
npm link
echo setup moddle-xml
cd $base/moddle-xml
npm link moddle
npm install
npm link
echo setup bpmn-moddle
cd $base/bpmn-moddle
npm link moddle-xml
npm link moddle
npm install
npm link
echo setup diagram-js-direct-editing
cd $base/diagram-js-direct-editing
npm link diagram-js
npm install
npm link
echo setup ids
cd $base/ids
npm install
npm link
@ -72,32 +34,10 @@ echo setup bpmn-js
cd $base/bpmn-js
npm install
npm link diagram-js
npm link diagram-js-direct-editing
npm link ids
npm link bpmn-moddle
npm link
echo setup bpmn-js-cli
cd $base/bpmn-js-cli
npm install
npm link bpmn-js
npm link
# deferred link cli (circular dev dependency)
cd $base/bpmn-js
npm link bpmn-js-cli
echo setup bpmn-js-integration
cd $base/bpmn-js-integration
npm install
npm link bpmn-js
npm link bpmn-js-cli
npm link bpmn-moddle
cd $base
echo all done.