Skip to content

Commit 2b18223

Browse files
committed
Fixing building and publishing
1 parent ace762c commit 2b18223

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
- node_modules
3535
key: v1-dependencies-{{ checksum "package.json" }}
3636

37+
- run: npm run build -- --prod
38+
3739
# run tests!
3840
- run: npm run lint
3941
- run: npm run test -- --watch=false --code-coverage

bin/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ then
77
exit 1;
88
fi
99

10-
npm run build
10+
npm run build:publish
1111

1212
mv ./angular-plotly.js.metadata.json dist
1313
cp ./README.md dist

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"scripts": {
77
"ng": "ng",
88
"start": "ng serve",
9-
"build": "ng-packagr -p ng-package.json",
9+
"build": "ng build",
10+
"build:publish": "ng-packagr -p ng-package.json",
1011
"lint": "ng lint",
1112
"test": "ng test",
1213
"postversion": "git push && git push --tags"

src/app/plotly-via-cdn/plotly-via-cdn.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { SharedModule } from '../shared/shared.module';
1111
exports: [PlotComponent]
1212
})
1313
export class PlotlyViaCDNModule {
14-
static plotlyVersion?: string;
14+
static plotlyVersion?: string = 'latest';
1515

1616
static setPlotlyVersion(version: string) {
1717
const isOk = version === 'latest' || /^\d\.\d{1,2}\.\d{1,2}$/.test(version);

src/app/shared/plotly.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Plotly } from './plotly.interface';
77
})
88
export class PlotlyService {
99
protected static instances: Plotly.PlotlyHTMLElement[] = [];
10-
protected static _plotly?: any;
10+
protected static _plotly?: any = undefined;
1111

1212
public static setPlotly(plotly: any) {
1313
PlotlyService._plotly = plotly;

0 commit comments

Comments
 (0)