Skip to content

Commit 7f26fd2

Browse files
committed
fix: bundle type definitions with @nrwl/js:tsc
1 parent b786b4f commit 7f26fd2

9 files changed

+30
-9
lines changed

libs/nodeplotlib/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nodeplotlib",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "NodeJS frontend-less plotting lib using plotly.js inspired by matplotlib",
55
"author": "Felix Lemke <[email protected]> (https://felixlemke.dev)",
66
"license": "MIT",

libs/nodeplotlib/project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"projectType": "library",
66
"architect": {
77
"build": {
8-
"builder": "@nrwl/node:webpack",
8+
"builder": "@nrwl/js:tsc",
99
"outputs": ["{options.outputPath}"],
1010
"options": {
1111
"main": "libs/nodeplotlib/src/index.ts",

libs/nodeplotlib/tsconfig.lib.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
"declaration": true,
77
"types": ["node"]
88
},
9-
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
9+
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"],
1010
"include": ["**/*.ts"]
1111
}

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nodeplotlib",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"license": "MIT",
55
"scripts": {
66
"ng": "nx",

tools/demo/scatter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
const npl = require('../../dist/libs/nodeplotlib/main');
1+
import npl from '../../dist/libs/nodeplotlib';
22
npl.plot([{ x: [0], y: [1], type: 'scatter' }]);

tools/demo/scatter.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { plot } from '../../dist/libs/nodeplotlib';
1+
import npl from '../../dist/libs/nodeplotlib';
22

3-
plot([{ x: [0, 1], y: [1, 1], type: 'scatter' }]);
3+
npl.plot([{ x: [0, 1], y: [1, 1], type: 'scatter' }]);

tools/demo/stream.ts

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { plot, Plot } from '../../dist/libs/nodeplotlib';
2+
import { interval, map, Observable } from 'rxjs';
3+
4+
const stream$: Observable<Plot[]> = interval(100).pipe(
5+
map(createSinusPlotFromNumber)
6+
);
7+
8+
function createSinusPlotFromNumber(num: number): Plot[] {
9+
const data: Plot[] = [
10+
{
11+
x: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
12+
y: Array(10)
13+
.fill(0)
14+
.map((_, i) => Math.sin(num + i)),
15+
type: 'scatter',
16+
},
17+
];
18+
return data;
19+
}
20+
21+
plot(stream$);

tools/util/copy-files.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { copySync } from 'fs-extra';
22

3-
copySync('dist/apps/web', 'dist/libs/nodeplotlib/web');
3+
copySync('dist/apps/web', 'dist/libs/nodeplotlib/src/lib/server/web');
44
copySync('libs/nodeplotlib/README.md', 'dist/libs/nodeplotlib/README.md');
55
copySync('LICENSE', 'dist/libs/nodeplotlib/LICENSE');

0 commit comments

Comments
 (0)