File tree Expand file tree Collapse file tree 4 files changed +27
-12
lines changed Expand file tree Collapse file tree 4 files changed +27
-12
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ const { addBabelPlugin, override} = require ( 'customize-cra' ) ;
2
+ const packageJSON = require ( './package' ) ;
3
+
4
+ module . exports = override (
5
+ addBabelPlugin ( [
6
+ 'search-and-replace' ,
7
+ {
8
+ rules : [
9
+ {
10
+ search : '__PACKAGE_VERSION__' ,
11
+ replace : packageJSON . version
12
+ }
13
+ ]
14
+ }
15
+ ] )
16
+ ) ;
Original file line number Diff line number Diff line change 51
51
"url-parse" : " ^1.4.3"
52
52
},
53
53
"devDependencies" : {
54
+ "babel-plugin-search-and-replace" : " ^1.0.0" ,
55
+ "customize-cra" : " ^0.9.1" ,
54
56
"eslint-config-prettier" : " ^3.6.0" ,
55
57
"eslint-config-uber-es2015" : " ^3.1.2" ,
56
58
"eslint-config-uber-jsx" : " ^3.3.3" ,
57
59
"eslint-plugin-babel" : " ^5.3.0" ,
58
60
"eslint-plugin-prettier" : " ^3.0.1" ,
59
- "eslint-plugin-react" : " ~7.12.4"
61
+ "eslint-plugin-react" : " ~7.12.4" ,
62
+ "react-app-rewired" : " ^2.1.5"
60
63
},
61
64
"scripts" : {
62
65
"predeploy" : " npm run build" ,
63
66
"deploy" : " gh-pages -d build" ,
64
- "start" : " react-scripts start" ,
65
- "build" : " react-scripts build" ,
66
- "test" : " react-scripts test --env=jsdom" ,
67
+ "start" : " react-app-rewired start" ,
68
+ "build" : " react-app-rewired --max_old_space_size=4096 build" ,
69
+ "test" : " react-app-rewired test --env=jsdom" ,
67
70
"eject" : " react-scripts eject"
68
71
},
69
72
"browserslist" : [
Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ import CustomSidebarFactory from './components/side-bar';
38
38
// Kepler.gl Schema APIs
39
39
import KeplerGlSchema from 'kepler.gl/schemas' ;
40
40
41
+ // READ version from package.json
42
+ const KEPLER_GL_VERSION = '__PACKAGE_VERSION__' ;
43
+
41
44
const CustomAddDataButtonFactory = ( ) => {
42
45
const NoButton = ( ) => < div /> ;
43
46
return NoButton ;
@@ -194,7 +197,7 @@ class KeplerGlComponent extends Component {
194
197
mapboxApiAccessToken = { this . props . mapboxAPIKey }
195
198
id = { MAP_ID }
196
199
appName = "Kepler.gl in Tableau"
197
- version = "0.1.0"
200
+ version = { KEPLER_GL_VERSION }
198
201
theme = { this . props . theme === 'light' ? 'base' : undefined }
199
202
width = { this . props . width }
200
203
height = { this . props . height }
You can’t perform that action at this time.
0 commit comments