From 36af585c35bf11f700da6c14ba0b0fa5c15d48ee Mon Sep 17 00:00:00 2001 From: Olof Bjerke Date: Tue, 30 Mar 2021 06:04:46 +0200 Subject: [PATCH] Add step about development server in readme --- examples/js-areachart-d3/README.md | 6 +++++- examples/ts-spiderchart-d3/README.md | 9 ++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/js-areachart-d3/README.md b/examples/js-areachart-d3/README.md index 5fdac50b..c70c9f48 100644 --- a/examples/js-areachart-d3/README.md +++ b/examples/js-areachart-d3/README.md @@ -1,12 +1,15 @@ -# Area Chart +# Area Chart + This is a complex mod example demonstrating an area chart rendered with `d3` and bundled with `Webpack`. All source code for the mod example can be found in the `src` folder. Other necessary files reside in the `static` folder. Read below for further explanation. ## Prerequisites + These instructions assume that you have [Node.js](https://nodejs.org/en/) (which includes npm) installed. ## How to get started (with development server) + - Open a terminal at the location of this example. - Run `npm install`. This will install necessary tools. Run this command only the first time you are building the mod and skip this step for any subsequent builds. - Run `npm start`. This will bundle the JavaScript and place it in the `dist` folder. This task will watch for changes in the code and will continue running until it is stopped. Whenever you save a file, the changes will be reflected in the visualization mod. @@ -15,6 +18,7 @@ These instructions assume that you have [Node.js](https://nodejs.org/en/) (which - In Spotfire, follow the steps of creating a new mod and connecting to the development server. ## Working without a development server + - Open a terminal at the location of this example. - Run `npm install`. This will install necessary tools. Run this command only the first time you are building the mod and skip this step for any subsequent builds. - Run `npm run build`. This will bundle the JavaScript and place it in the `dist` folder. It also copies the contents of `static` into `dist`. This task will not watch for changes in the code. diff --git a/examples/ts-spiderchart-d3/README.md b/examples/ts-spiderchart-d3/README.md index b31011fa..bdc6f786 100644 --- a/examples/ts-spiderchart-d3/README.md +++ b/examples/ts-spiderchart-d3/README.md @@ -1,9 +1,7 @@ -

- Spider chart example -

- # Spider chart +![Spider chart example](SpiderChartModExample.png) + This is a mod example demonstrating a spider chart written in `TypeScript`, rendered with `d3` and bundled with `Webpack`. All source code for the mod example can be found in the `src` folder. Other necessary files reside in the `static` folder. Read below for further explanation. @@ -16,7 +14,8 @@ These instructions assume that you have [Node.js](https://nodejs.org/en/) (which - Open a terminal at the location of this example. - Run `npm install`. This will install necessary tools. Run this command only the first time you are building the mod and skip this step for any subsequent builds. -- Run `npm start`. This will compile TypeScript to JavaScript and place the bundle in the `dist` folder. This task will watch for changes in code and will continue running until it is stopped. Whenever you save a file, the changes will be reflected in the visualization mod. This task will also start a development server. +- Run `npm start`. This will compile TypeScript to JavaScript and place the bundle in the `dist` folder. This task will watch for changes in code and will continue running until it is stopped. Whenever you save a file, the changes will be reflected in the visualization mod. +- Run `npm run server` in a separate terminal. This will start a development server. - Start editing, for example `src/main.ts`. - In Spotfire, follow the steps of creating a new mod and connecting to the development server.