Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit c8a58c9

Browse files
committed
fix: address PR #392 comments
1 parent 2f25555 commit c8a58c9

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

packages/superset-ui-legacy-plugin-chart-table/test/ReactDataTable.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import React from 'react';
2020
import { mount } from 'enzyme';
2121
import ReactDataTable from '../src/ReactDataTable';
2222
import transformProps from '../src/transformProps';
23-
import * as testData from './test_data';
23+
import testData from './testData';
2424

2525
describe('legacy-table', () => {
2626
// Can test more prop transformation here. Not needed for now.

packages/superset-ui-legacy-plugin-chart-table/test/test_data.ts renamed to packages/superset-ui-legacy-plugin-chart-table/test/testData.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const basicChartProps = {
5555
/**
5656
* Basic data input
5757
*/
58-
export const basic: ChartProps = {
58+
const basic: ChartProps = {
5959
...basicChartProps,
6060
queryData: {
6161
data: {
@@ -81,7 +81,7 @@ export const basic: ChartProps = {
8181
* - verbose map
8282
* - metric columns
8383
*/
84-
export const advanced: ChartProps = {
84+
const advanced: ChartProps = {
8585
...basic,
8686
datasource: {
8787
columnFormats: {},
@@ -101,3 +101,8 @@ export const advanced: ChartProps = {
101101
},
102102
},
103103
};
104+
105+
export default {
106+
basic,
107+
advanced,
108+
};

scripts/build.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
const { spawnSync, spawn } = require('child_process');
55

66
const glob = process.argv[2];
7+
const extraArgs = process.argv.slice(2);
78

89
process.env.PATH = `./node_modules/.bin:${process.env.PATH}`;
910

@@ -18,11 +19,14 @@ const run = (cmd) => {
1819
};
1920

2021
if (glob) {
21-
run(`nimbus eslint packages/${glob}/{src,test}`);
22-
run(`nimbus prettier --check --workspaces=\"@superset-ui/${glob}"`);
23-
run(`nimbus babel --clean --workspaces=\"@superset-ui/${glob}"`);
24-
run(`nimbus babel --clean --workspaces=\"@superset-ui/${glob}" --esm`);
25-
run(`nimbus typescript --build --workspaces=\"@superset-ui/${glob}"`);
22+
run(`nimbus prettier packages/${glob}/{src,test}/**/*.{js,jsx,ts,tsx,css}"`);
23+
// lint is slow, so not turning it on by default
24+
if (extraArgs.includes('--lint')) {
25+
run(`nimbus eslint packages/${glob}/{src,test}`);
26+
}
27+
run(`nimbus babel --clean --workspaces="@superset-ui/${glob}"`);
28+
run(`nimbus babel --clean --workspaces="@superset-ui/${glob}" --esm`);
29+
run(`nimbus typescript --build --workspaces="@superset-ui/${glob}"`);
2630
require('./buildAssets');
2731
} else {
2832
run('yarn build');

0 commit comments

Comments
 (0)