From 28cec5d44e7bee376033a18d8d61c847dc65b3cc Mon Sep 17 00:00:00 2001 From: pedesen Date: Tue, 29 Sep 2015 11:45:41 +0200 Subject: [PATCH] chore(project): update setup instructions Closes #318 --- docs/project/SETUP.md | 30 ++++++---------- docs/project/setup-alternative.sh | 50 +------------------------- docs/project/setup.bat | 53 +-------------------------- docs/project/setup.sh | 60 ------------------------------- 4 files changed, 12 insertions(+), 181 deletions(-) diff --git a/docs/project/SETUP.md b/docs/project/SETUP.md index 90dd293c..76076695 100644 --- a/docs/project/SETUP.md +++ b/docs/project/SETUP.md @@ -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 -│ ├─moddle │ └─bpmn-moddle -├─bpmn-moddle -│ └─node_modules -│ ├─moddle -│ └─moddle-xml ├─diagram-js -├─moddle -└─moddle-xml - └─node_modules - └─moddle +├─bpmn-moddle ``` -#### On Linux +#### On OS X, Linux -Use [npm-link](https://www.npmjs.org/doc/link.html) or `ln -s `. +Use [npm-link](https://docs.npmjs.com/cli/link) or `ln -s `. #### On Windows Use `mklink /d ` [(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). diff --git a/docs/project/setup-alternative.sh b/docs/project/setup-alternative.sh index c478cfd5..1d631fed 100644 --- a/docs/project/setup-alternative.sh +++ b/docs/project/setup-alternative.sh @@ -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. \ No newline at end of file +echo all done. diff --git a/docs/project/setup.bat b/docs/project/setup.bat index 4df16b80..96df4c19 100644 --- a/docs/project/setup.bat +++ b/docs/project/setup.bat @@ -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% \ No newline at end of file +cd %BASE% diff --git a/docs/project/setup.sh b/docs/project/setup.sh index 7e6708e3..fb0190d0 100644 --- a/docs/project/setup.sh +++ b/docs/project/setup.sh @@ -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.