Skip to content

Commit

Permalink
Add step about development server in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
objerke committed Mar 30, 2021
1 parent 314a946 commit 36af585
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 5 additions & 1 deletion examples/js-areachart-d3/README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.
Expand Down
9 changes: 4 additions & 5 deletions examples/ts-spiderchart-d3/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<p align="center">
<img width="500" alt="Spider chart example" src="https://github.com/TIBCOSoftware/spotfire-mods/blob/master/examples/ts-spiderchart-d3/SpiderChartModExample.png?raw=true">
</p>

# 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.
Expand All @@ -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.

Expand Down

0 comments on commit 36af585

Please sign in to comment.