This repository was archived by the owner on Oct 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
examples/react/develop/functional-component-ts/src Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,11 @@ import { hideBin } from 'yargs/helpers';
66// Loads environment variables from the '.env' file
77dotenv . config ( ) ;
88
9- // TODO implement yargs https://yargs.js.org/
10-
119// hideBind handles the 'process.argv.slice' logic
1210const argv = yargs ( hideBin ( process . argv ) )
1311 . option ( '_' , {
1412 type : 'string' ,
15- default : [ './benchmarks/react/counter' ] ,
13+ // default: ['./benchmarks/react/counter'],
1614 description : 'What benchmark to execute' ,
1715 } )
1816 . option ( 'dev' , {
@@ -25,12 +23,10 @@ const argv = yargs(hideBin(process.argv))
2523 type : 'string' ,
2624 default : 'speed' ,
2725 description : 'What type of benchmark to be executed' ,
28- } ) . argv ;
29-
30- console . log ( argv ) ;
26+ } ) . argv as any ;
3127
3228const entry = argv . _ [ 0 ] ;
33- const isDev = argv . dev ;
29+ const isDev = argv . dev || process . env . DEV === 'true' ;
3430const benchmarkType = argv . type ;
3531
3632if ( entry == null ) {
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414 STATE_OBJECT ,
1515} from './core' ;
1616import { generateId } from '@agile-ts/utils' ;
17+ import { globalBind } from '@agile-ts/core' ;
1718
1819let rerenderCount = 0 ;
1920let rerenderCountInCountupView = 0 ;
@@ -69,7 +70,7 @@ const App = (props: any) => {
6970
7071 // Create global Instance of Core (for better debugging)
7172 useEffect ( ( ) => {
72- // globalBind('__core__', { ...require('./core') });
73+ globalBind ( '__core__' , { ...require ( './core' ) } ) ;
7374 } , [ ] ) ;
7475
7576 const CountupView = ( ) => {
You can’t perform that action at this time.
0 commit comments