From 0d2e36c3046ff949f3df7653acaabe7116a7b9a2 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Mon, 21 Dec 2020 13:43:19 +0100 Subject: [PATCH] docs: move single run to CONTRIBUTING guide Also featured directly on the front-page (README). --- .github/CONTRIBUTING.md | 29 ++++++++++++++++++++++------- docs/project/SETUP.md | 23 +---------------------- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8bddf62a..43da0620 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -35,7 +35,7 @@ Learn how to setup the project locally, make changes and contribute bug fixes an The project development runs on top of the [diagram-js](https://github.com/bpmn-io/diagram-js) master branch. The following code snippet sets up both libraries linking diagram-js to bpmn-js. -```plain +```sh mkdir bpmn.io cd bpmn.io @@ -44,17 +44,32 @@ git clone git@github.com:bpmn-io/diagram-js.git git clone git@github.com:bpmn-io/bpmn-js.git (cd bpmn-js && npm install && npm link ../diagram-js) - -// Run the test suite -npm test - -// Running the test suite with every file change -TEST_BROWSERS=(Chrome|Firefox|IE) npm run dev ``` For details consult our in depth [setup guide](https://github.com/bpmn-io/bpmn-js/blob/master/docs/project/SETUP.md). +### Build and Run the Project + +Spin up a single modeler instance for local inspection: + +```sh +npm start +``` + +Spin up the development environment, re-run tests with every file change: + +```sh +TEST_BROWSERS=(Chrome|Firefox|IE) npm run dev +``` + +Build, lint, and test the project, just as the CI does. + +```sh +npm run all +``` + + ### Discussing Code Changes Create a [pull request](#creating-a-pull-request) if you would like to have an in-depth discussion about some piece of code. diff --git a/docs/project/SETUP.md b/docs/project/SETUP.md index 83a59572..a4e02dd9 100644 --- a/docs/project/SETUP.md +++ b/docs/project/SETUP.md @@ -63,25 +63,4 @@ Execute `npm run all` on each project. Things should be fine. ### Setup via Script -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). - - -### Running a single modeler instance - -To test changes that you might have made in [bpmn-js](https://github.com/bpmn-io/bpmn-js) or in any of the libraries it depends on, -you can run a single test that will instantiate a modeler with all the core modules. - -* Open the [file testing the modeler](https://github.com/bpmn-io/bpmn-js/blob/master/test/spec/ModelerSpec.js#L49) -* Change - ```javascript - it('should import simple process', function() { - ``` - to - ```javascript - it.only('should import simple process', function() { - ``` - (This ensures only this single test is run) - -* Execute `npm run dev` -* Open your browser to -* Interact with the modeler and see your changes reflected \ No newline at end of file +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). \ No newline at end of file