Skip to content

Commit 537c1a9

Browse files
author
Niilo Keinänen
committed
Update dependencies
1 parent 15a0a1f commit 537c1a9

File tree

7 files changed

+4542
-12227
lines changed

7 files changed

+4542
-12227
lines changed

package-lock.json

Lines changed: 4453 additions & 12158 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@
55
"main": "index.js",
66
"scripts": {
77
"start": "webpack-dev-server",
8-
"build": "webpack --mode production"
8+
"build": "webpack --mode=production --node-env=production",
9+
"build:dev": "webpack --mode=development",
10+
"build:prod": "webpack --mode=production --node-env=production",
11+
"watch": "webpack --watch",
12+
"serve": "webpack serve"
913
},
1014
"keywords": [],
1115
"author": "",
1216
"license": "MIT",
1317
"devDependencies": {
14-
"html-webpack-plugin": "^4.4.1",
15-
"ts-loader": "^8.0.3",
16-
"typescript": "^4.0.2",
17-
"webpack": "^4.44.1",
18-
"webpack-cli": "^3.3.12",
19-
"webpack-dev-server": "^3.11.0"
18+
"html-webpack-plugin": "^5.5.0",
19+
"ts-loader": "^9.4.1",
20+
"typescript": "^4.8.4",
21+
"webpack": "^5.74.0",
22+
"webpack-cli": "^4.10.0",
23+
"webpack-dev-server": "^4.11.1"
2024
},
2125
"dependencies": {
2226
"@arction/lcjs": "^3.4.0"

src/app.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/ecg.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

src/index.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { lightningChart, SolidLine } from "@arction/lcjs";
2+
3+
const chart = lightningChart().ChartXY();
4+
5+
chart.setTitle("Getting Started");
6+
7+
const lineSeries = chart.addLineSeries();
8+
9+
lineSeries.setStrokeStyle((style: SolidLine) => style.setThickness(5));
10+
11+
lineSeries.add([
12+
{ x: 0, y: 0 },
13+
{ x: 1, y: 7 },
14+
{ x: 2, y: 3 },
15+
{ x: 3, y: 10 },
16+
]);

tsconfig.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
2-
"compilerOptions": {
3-
"outDir": "./dist",
4-
"module": "commonjs",
5-
"target": "es5",
6-
"esModuleInterop": true,
7-
"lib": [
8-
"es2015",
9-
"dom"
10-
]
11-
}
2+
"compilerOptions": {
3+
"allowSyntheticDefaultImports": true,
4+
"noImplicitAny": true,
5+
"module": "es6",
6+
"target": "es5",
7+
"allowJs": true,
8+
"moduleResolution": "node"
9+
},
10+
"files": ["src/index.ts"]
1211
}

webpack.config.js

Lines changed: 52 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,53 @@
1-
const HtmlWebpackPlugin = require('html-webpack-plugin')
2-
const path = require('path')
1+
// Generated using webpack-cli https://github.com/webpack/webpack-cli
32

4-
module.exports = {
5-
mode: 'development',
6-
entry: './src/app.ts',
7-
module:{
8-
rules:[
9-
{
10-
test: /\.tsx?$/,
11-
use: 'ts-loader',
12-
exclude: /node_modules/
13-
}
14-
]
15-
},
16-
devServer: {
17-
contentBase: path.join(__dirname, 'dist'),
18-
compress: true
19-
},
20-
resolve: {
21-
extensions: ['.ts', '.js']
22-
},
23-
output: {
24-
filename: '[name].bundle.js',
25-
path: path.resolve(__dirname, 'dist')
26-
},
27-
optimization:{
28-
splitChunks: {
29-
chunks: 'all'
30-
}
31-
},
32-
plugins: [
33-
new HtmlWebpackPlugin({
34-
title: 'lcjs-typescript-example'
35-
})
36-
]
37-
}
3+
const path = require("path");
4+
const HtmlWebpackPlugin = require("html-webpack-plugin");
5+
6+
const isProduction = process.env.NODE_ENV == "production";
7+
8+
const config = {
9+
entry: "./src/index.ts",
10+
output: {
11+
path: path.resolve(__dirname, "dist"),
12+
},
13+
devServer: {
14+
open: true,
15+
host: "localhost",
16+
},
17+
plugins: [
18+
new HtmlWebpackPlugin(),
19+
// Add your plugins here
20+
// Learn more about plugins from https://webpack.js.org/configuration/plugins/
21+
],
22+
module: {
23+
rules: [
24+
{
25+
test: /\.(ts|tsx)$/i,
26+
loader: "ts-loader",
27+
exclude: ["/node_modules/"],
28+
},
29+
{
30+
test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i,
31+
type: "asset",
32+
},
33+
34+
// Add your rules for custom modules here
35+
// Learn more about loaders from https://webpack.js.org/loaders/
36+
],
37+
},
38+
resolve: {
39+
extensions: [".tsx", ".ts", ".jsx", ".js", "..."],
40+
},
41+
externals: {
42+
perf_hooks: "{}",
43+
},
44+
};
45+
46+
module.exports = () => {
47+
if (isProduction) {
48+
config.mode = "production";
49+
} else {
50+
config.mode = "development";
51+
}
52+
return config;
53+
};

0 commit comments

Comments
 (0)