Skip to content

Commit

Permalink
Merge pull request #1260 from tradingview/update-readme-4.0
Browse files Browse the repository at this point in the history
Update readme 4.0
  • Loading branch information
SlicedSilver committed Feb 8, 2023
2 parents 731084c + 4950d45 commit 4b8aa7e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ lineSeries.setData([
]);
```

### Build Variants

|Dependencies included|Mode|ES module|CommonJS ⚠️|IIFE (`window.LightweightCharts`)|
|-|-|-|-|-|
|No|PROD|`lightweight-charts.production.mjs`|`lightweight-charts.production.cjs`|N/A|
|No|DEV|`lightweight-charts.development.mjs`|`lightweight-charts.development.cjs`|N/A|
|Yes (standalone)|PROD|`lightweight-charts.standalone.production.mjs`|-|`lightweight-charts.standalone.production.js`|
|Yes (standalone)|DEV|`lightweight-charts.standalone.development.mjs`|-|`lightweight-charts.standalone.development.js`|

⚠️ **Deprecation note:** CommonJS support will be removed from the library at the start of 2024.

## Development

See [BUILDING.md](./BUILDING.md) for instructions on how to build `lightweight-charts` from source.
Expand Down
4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function getCurrentVersion() {

const currentVersion = getCurrentVersion();

const year = new Date().getFullYear();

function getConfig(
inputFile,
{ format, isProd, isStandalone }
Expand All @@ -34,7 +36,7 @@ function getConfig(
/*!
* @license
* TradingView Lightweight Charts v${currentVersion}
* Copyright (c) 2022 TradingView, Inc.
* Copyright (c) ${year} TradingView, Inc.
* Licensed under Apache License 2.0 https://www.apache.org/licenses/LICENSE-2.0
*/`.trim(),
},
Expand Down
13 changes: 13 additions & 0 deletions website/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ npm install --save lightweight-charts

_Note that the package is shipped with TypeScript declarations, so you can easily use it within TypeScript code._

### Build variants

The library ships with the following build variants:

|Dependencies included|Mode|ES module|CommonJS ⚠️|IIFE (`window.LightweightCharts`)|
|-|-|-|-|-|
|No|PROD|`lightweight-charts.production.mjs`|`lightweight-charts.production.cjs`|N/A|
|No|DEV|`lightweight-charts.development.mjs`|`lightweight-charts.development.cjs`|N/A|
|Yes (standalone)|PROD|`lightweight-charts.standalone.production.mjs`|-|`lightweight-charts.standalone.production.js`|
|Yes (standalone)|DEV|`lightweight-charts.standalone.development.mjs`|-|`lightweight-charts.standalone.development.js`|

⚠️ **Deprecation note:** CommonJS support will be removed from the library at the start of 2024.

## Creating a chart

Once the library has been installed in your repo you're ready to create your first chart.
Expand Down

0 comments on commit 4b8aa7e

Please sign in to comment.