@@ -9,18 +9,21 @@ import {
99 relative
1010} from 'path'
1111import {
12+ createDirectoryIfNotExist ,
13+ createFile ,
1214 nodeModulesDirectory ,
1315 packageName ,
16+ packageRootDirectory ,
1417 packageSourcesDirectory as sourcesDir ,
1518 packageTestsBenchmarksDirectory as benchesDir ,
16- createDirectoryIfNotExist ,
17- createFile ,
1819 packageTestsDirectory
19- } from '../../_utils.mjs'
20+ } from '../../_utils.mjs'
2021import { sourcesFiles } from '../../configs/compute-benchmarks.conf.mjs'
2122
2223const {
2324 red,
25+ green,
26+ blue,
2427 yellow
2528 } = colors
2629
@@ -136,14 +139,14 @@ const computeBenchmarksTask = ( done ) => {
136139 }
137140
138141 // compute relative level to get import wrappers
139- const wrapperDirPath = relative ( benchDirPath , packageTestsDirectory )
142+ const wrapperDirPath = relative ( benchDirPath , packageTestsDirectory )
140143 const importBenchmarkFilePath = join ( wrapperDirPath , 'import.benchmarks.js' )
141- const importTestingFilePath = join ( wrapperDirPath , 'import.testing.js' )
144+ const importTestingFilePath = join ( wrapperDirPath , 'import.testing.js' )
142145
143146 const template = '' +
144147 `import * as ${ nsName } from '${ importFilePath } '` + '\n' +
145- `import { getBenchmarkPackage } from '${ importBenchmarkFilePath } '` + '\n' +
146- `import { getTestingPackage } from '${ importTestingFilePath } '` + '\n' +
148+ `import { getBenchmarkPackage } from '${ importBenchmarkFilePath } '` + '\n' +
149+ `import { getTestingPackage } from '${ importTestingFilePath } '` + '\n' +
147150 '\n' +
148151 `const Benchmark = await getBenchmarkPackage()` + '\n' +
149152 `const Testing = await getTestingPackage()` + '\n' +
@@ -213,4 +216,6 @@ computeBenchmarksTask.displayName = 'compute-benchmarks'
213216computeBenchmarksTask . description = 'Will generate benchmarks files from source code against provided alternatives.'
214217computeBenchmarksTask . flags = null
215218
219+ log ( 'Loading ' , green ( relative ( packageRootDirectory , import . meta. filename ) ) , `with task ${ blue ( computeBenchmarksTask . displayName ) } ` )
220+
216221export { computeBenchmarksTask }
0 commit comments