itee-tasks 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/configs/tests/benchmarks/compute-benchmarks.conf.mjs +3 -23
  3. package/configs/tests/bundlings/check-bundling-from-esm-files-direct.conf.mjs +43 -37
  4. package/configs/tests/bundlings/check-bundling-from-esm-files-import.conf.mjs +40 -34
  5. package/configs/tests/units/compute-unit-tests.conf.mjs +2 -22
  6. package/package.json +1 -1
  7. package/sources/_utils.mjs +54 -35
  8. package/sources/builds/build.task.mjs +7 -10
  9. package/sources/cleans/clean.task.mjs +6 -10
  10. package/sources/docs/doc.task.mjs +7 -8
  11. package/sources/helps/help.task.mjs +4 -3
  12. package/sources/lints/lint.task.mjs +8 -9
  13. package/sources/refresh.mjs +5 -5
  14. package/sources/releases/release.task.mjs +4 -3
  15. package/sources/tests/benchmarks/compute-benchmarks.task.mjs +32 -20
  16. package/sources/tests/benchmarks/run-benchmarks-for-backend.task.mjs +4 -3
  17. package/sources/tests/benchmarks/run-benchmarks-for-frontend.task.mjs +6 -10
  18. package/sources/tests/benchmarks/run-benchmarks.task.mjs +6 -11
  19. package/sources/tests/bundlings/check-bundling-from-esm-build-import.task.mjs +5 -9
  20. package/sources/tests/bundlings/check-bundling-from-esm-files-direct.task.mjs +27 -21
  21. package/sources/tests/bundlings/check-bundling-from-esm-files-import.task.mjs +29 -22
  22. package/sources/tests/bundlings/check-bundling.task.mjs +4 -3
  23. package/sources/tests/run-tests.task.mjs +4 -3
  24. package/sources/tests/units/compute-unit-tests.task.mjs +31 -19
  25. package/sources/tests/units/run-unit-tests-for-backend.task.mjs +4 -3
  26. package/sources/tests/units/run-unit-tests-for-frontend.task.mjs +6 -10
  27. package/sources/tests/units/run-unit-tests.task.mjs +6 -11
  28. package/configs/tests/bundlings/check-bundling.conf.mjs +0 -25
package/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ # [v1.0.6](https://github.com/Itee/itee-tasks/compare/v1.0.5...v1.0.6) (2026-01-14)
2
+
3
+ ## 🐛 Bug Fixes
4
+ - [`53d9dac`](https://github.com/Itee/itee-tasks/commit/53d9dac) (utils) fix search config for different kind of config files (js, mjs and json)
5
+
6
+ # [v1.0.5](https://github.com/Itee/itee-tasks/compare/v1.0.4...v1.0.5) (2026-01-14)
7
+
8
+ ## 🐛 Bug Fixes
9
+ - [`d46c8f8`](https://github.com/Itee/itee-tasks/commit/d46c8f8) (check-bundling) fix wrong package import path
10
+ - [`6bd2598`](https://github.com/Itee/itee-tasks/commit/6bd2598) (compute-benchmarks) fix wrong package import path
11
+
1
12
  # [v1.0.4](https://github.com/Itee/itee-tasks/compare/v1.0.3...v1.0.4) (2026-01-13)
2
13
 
3
14
  # [v1.0.3](https://github.com/Itee/itee-tasks/compare/v1.0.2...v1.0.3) (2026-01-13)
@@ -1,25 +1,5 @@
1
- import { glob } from 'glob'
2
- import {
3
- basename,
4
- join,
5
- normalize
6
- } from 'path'
7
- import {
8
- packageName,
9
- packageSourcesDirectory
10
- } from '../../../sources/_utils.mjs'
1
+ import { packageName } from '../../../sources/_utils.mjs'
11
2
 
12
-
13
- const filePathsToIgnore = [
3
+ export default [
14
4
  `${ packageName }.js`
15
- ]
16
-
17
- export default glob.sync( join( packageSourcesDirectory, '**' ) )
18
- .map( filePath => normalize( filePath ) )
19
- .filter( filePath => {
20
- const fileName = basename( filePath )
21
- const isJsFile = fileName.endsWith( '.js' )
22
- const isNotPrivateFile = !fileName.startsWith( '_' )
23
- const isNotIgnoredFile = !filePathsToIgnore.includes( fileName )
24
- return isJsFile && isNotPrivateFile && isNotIgnoredFile
25
- } )
5
+ ]
@@ -1,45 +1,51 @@
1
- import nodeResolve from '@rollup/plugin-node-resolve'
2
- import cleanup from 'rollup-plugin-cleanup'
1
+ import nodeResolve from '@rollup/plugin-node-resolve'
2
+ import cleanup from 'rollup-plugin-cleanup'
3
+ import { packageName } from '../../../sources/index.mjs'
3
4
 
4
5
  export default {
5
- input: null,
6
- external: [ '' ],
7
- plugins: [
8
- nodeResolve( {
9
- preferBuiltins: true
10
- } ),
11
- cleanup( {
12
- comments: 'none'
13
- } )
6
+ ignoredFiles: [
7
+ `${ packageName }.js`
14
8
  ],
15
- onwarn: ( {
16
- loc,
17
- frame,
18
- message
19
- } ) => {
9
+ buildOptions: {
10
+ input: null,
11
+ external: [ '' ],
12
+ plugins: [
13
+ nodeResolve( {
14
+ preferBuiltins: true
15
+ } ),
16
+ cleanup( {
17
+ comments: 'none'
18
+ } )
19
+ ],
20
+ onwarn: ( {
21
+ loc,
22
+ frame,
23
+ message
24
+ } ) => {
20
25
 
21
- // Ignore some errors
22
- if ( message.includes( 'Circular dependency' ) ) { return }
23
- if ( message.includes( 'Generated an empty chunk' ) ) { return }
26
+ // Ignore some errors
27
+ if ( message.includes( 'Circular dependency' ) ) { return }
28
+ if ( message.includes( 'Generated an empty chunk' ) ) { return }
24
29
 
25
- if ( loc ) {
26
- process.stderr.write( `/!\\ ${ loc.file } (${ loc.line }:${ loc.column }) ${ frame } ${ message }\n` )
27
- } else {
28
- process.stderr.write( `/!\\ ${ message }\n` )
29
- }
30
+ if ( loc ) {
31
+ process.stderr.write( `/!\\ ${ loc.file } (${ loc.line }:${ loc.column }) ${ frame } ${ message }\n` )
32
+ } else {
33
+ process.stderr.write( `/!\\ ${ message }\n` )
34
+ }
30
35
 
31
- },
32
- treeshake: {
33
- moduleSideEffects: true,
34
- annotations: true,
35
- correctVarValueBeforeDeclaration: true,
36
- propertyReadSideEffects: true,
37
- tryCatchDeoptimization: true,
38
- unknownGlobalSideEffects: true
39
- },
40
- output: {
41
- indent: '\t',
42
- format: 'esm',
43
- file: null
36
+ },
37
+ treeshake: {
38
+ moduleSideEffects: true,
39
+ annotations: true,
40
+ correctVarValueBeforeDeclaration: true,
41
+ propertyReadSideEffects: true,
42
+ tryCatchDeoptimization: true,
43
+ unknownGlobalSideEffects: true
44
+ },
45
+ output: {
46
+ indent: '\t',
47
+ format: 'esm',
48
+ file: null
49
+ }
44
50
  }
45
51
  }
@@ -1,42 +1,48 @@
1
- import nodeResolve from '@rollup/plugin-node-resolve'
2
- import cleanup from 'rollup-plugin-cleanup'
1
+ import nodeResolve from '@rollup/plugin-node-resolve'
2
+ import cleanup from 'rollup-plugin-cleanup'
3
+ import { packageName } from '../../../sources/index.mjs'
3
4
 
4
5
  export default {
5
- input: null,
6
- plugins: [
7
- nodeResolve(),
8
- cleanup( {
9
- comments: 'all' // else remove __PURE__ declaration... -_-'
10
- } )
6
+ ignoredFiles: [
7
+ `${ packageName }.js`
11
8
  ],
12
- onwarn: ( {
13
- loc,
14
- frame,
15
- message
16
- } ) => {
9
+ buildOptions: {
10
+ input: null,
11
+ plugins: [
12
+ nodeResolve(),
13
+ cleanup( {
14
+ comments: 'all' // else remove __PURE__ declaration... -_-'
15
+ } )
16
+ ],
17
+ onwarn: ( {
18
+ loc,
19
+ frame,
20
+ message
21
+ } ) => {
17
22
 
18
- // Ignore some errors
19
- if ( message.includes( 'Circular dependency' ) ) { return }
20
- if ( message.includes( 'Generated an empty chunk' ) ) { return }
23
+ // Ignore some errors
24
+ if ( message.includes( 'Circular dependency' ) ) { return }
25
+ if ( message.includes( 'Generated an empty chunk' ) ) { return }
21
26
 
22
- if ( loc ) {
23
- process.stderr.write( `/!\\ ${ loc.file } (${ loc.line }:${ loc.column }) ${ frame } ${ message }\n` )
24
- } else {
25
- process.stderr.write( `/!\\ ${ message }\n` )
26
- }
27
+ if ( loc ) {
28
+ process.stderr.write( `/!\\ ${ loc.file } (${ loc.line }:${ loc.column }) ${ frame } ${ message }\n` )
29
+ } else {
30
+ process.stderr.write( `/!\\ ${ message }\n` )
31
+ }
27
32
 
28
- },
29
- treeshake: {
30
- moduleSideEffects: true,
31
- annotations: true,
32
- correctVarValueBeforeDeclaration: true,
33
- propertyReadSideEffects: true,
34
- tryCatchDeoptimization: true,
35
- unknownGlobalSideEffects: true
36
- },
37
- output: {
38
- indent: '\t',
39
- format: 'esm',
40
- file: null
33
+ },
34
+ treeshake: {
35
+ moduleSideEffects: true,
36
+ annotations: true,
37
+ correctVarValueBeforeDeclaration: true,
38
+ propertyReadSideEffects: true,
39
+ tryCatchDeoptimization: true,
40
+ unknownGlobalSideEffects: true
41
+ },
42
+ output: {
43
+ indent: '\t',
44
+ format: 'esm',
45
+ file: null
46
+ }
41
47
  }
42
48
  }
@@ -1,25 +1,5 @@
1
- import { glob } from 'glob'
2
- import {
3
- basename,
4
- join,
5
- normalize
6
- } from 'path'
7
- import {
8
- packageName,
9
- packageSourcesDirectory
10
- } from '../../../sources/_utils.mjs'
1
+ import { packageName } from '../../../sources/_utils.mjs'
11
2
 
12
-
13
- const filePathsToIgnore = [
3
+ export default [
14
4
  `${ packageName }.js`
15
5
  ]
16
-
17
- export default glob.sync( join( packageSourcesDirectory, '**' ) )
18
- .map( filePath => normalize( filePath ) )
19
- .filter( filePath => {
20
- const fileName = basename( filePath )
21
- const isJsFile = fileName.endsWith( '.js' )
22
- const isNotPrivateFile = !fileName.startsWith( '_' )
23
- const isNotIgnoredFile = !filePathsToIgnore.includes( fileName )
24
- return isJsFile && isNotPrivateFile && isNotIgnoredFile
25
- } )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itee-tasks",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Allow to manage all commons itee gulp tasks into one place ",
5
5
  "keywords": [
6
6
  "itee",
@@ -13,6 +13,7 @@ import {
13
13
  writeFileSync
14
14
  } from 'node:fs'
15
15
  import {
16
+ basename,
16
17
  dirname,
17
18
  extname,
18
19
  join,
@@ -48,45 +49,71 @@ function getJsonFrom( path ) {
48
49
 
49
50
  }
50
51
 
51
- function getConfigurationPathFor( configurationLocation ) {
52
-
53
- const packageConfigurationPath = join( packageTasksConfigurationsDirectory, configurationLocation )
54
- const defaultConfigurationPath = join( iteePackageConfigurationsDirectory, configurationLocation )
52
+ function getTaskConfigurationPathFor( filename ) {
53
+
54
+ // Get relative path of the task between internal or user defined
55
+ let relativeTaskPath = filename.includes( iteePackageSourcesDirectory )
56
+ ? relative( iteePackageSourcesDirectory, filename )
57
+ : relative( packageTasksDirectory, filename )
58
+
59
+ // Generate all possible config file path depending on file extension and default or user defined
60
+ const terminalExtension = extname( relativeTaskPath )
61
+ const searchValue = `.task${ terminalExtension }`
62
+ const replaceValues = [
63
+ '.conf.json',
64
+ '.conf.js',
65
+ '.conf.mjs',
66
+ ]
67
+ const configurationPaths = []
68
+
69
+ for ( const replaceValue of replaceValues ) {
70
+ const configurationLocation = relativeTaskPath.replace( searchValue, replaceValue )
71
+ const packageConfigurationPath = join( packageTasksConfigurationsDirectory, configurationLocation )
72
+ const defaultConfigurationPath = join( iteePackageConfigurationsDirectory, configurationLocation )
73
+
74
+ configurationPaths.push(
75
+ packageConfigurationPath,
76
+ defaultConfigurationPath
77
+ )
78
+ }
55
79
 
80
+ // Looking for existing configuration file (care the user defined must be searched before the default !)
56
81
  let configurationPath
82
+ for ( const currentConfigurationPath of configurationPaths ) {
57
83
 
58
- if ( existsSync( packageConfigurationPath ) ) {
59
-
60
- configurationPath = packageConfigurationPath
61
-
62
- } else if ( existsSync( defaultConfigurationPath ) ) {
63
-
64
- configurationPath = defaultConfigurationPath
65
-
66
- } else {
84
+ if ( existsSync( currentConfigurationPath ) ) {
85
+ configurationPath = currentConfigurationPath
86
+ break
87
+ }
67
88
 
68
- throw new Error( `Unable to find configuration for path ${ packageConfigurationPath } or ${ defaultConfigurationPath }` )
89
+ }
69
90
 
91
+ if ( !configurationPath ) {
92
+ throw new Error( `Unable to find configuration in paths ${ configurationPaths.join( ', ' ) }.` )
70
93
  }
71
94
 
72
95
  return configurationPath
73
96
 
74
97
  }
75
98
 
76
- async function getConfigurationFrom( path ) {
99
+ async function getTaskConfigurationFor( filename ) {
100
+
101
+ const configurationFilePath = getTaskConfigurationPathFor( filename )
77
102
 
78
- let jsonData = null
103
+ log( `Loading configuration from ${ cyan( configurationFilePath ) }` )
104
+
105
+ let configuration = null
79
106
 
80
107
  try {
81
108
 
82
- if ( extname( path ) !== '.json' ) {
109
+ if ( extname( configurationFilePath ) === '.json' ) {
83
110
 
84
- const moduleData = await import(path)
85
- jsonData = moduleData.default
111
+ configuration = getJsonFrom( configurationFilePath )
86
112
 
87
113
  } else {
88
114
 
89
- jsonData = getJsonFrom( path )
115
+ const moduleData = await import( configurationFilePath )
116
+ configuration = moduleData.default
90
117
 
91
118
  }
92
119
 
@@ -96,7 +123,7 @@ async function getConfigurationFrom( path ) {
96
123
 
97
124
  }
98
125
 
99
- return jsonData
126
+ return configuration
100
127
 
101
128
  }
102
129
 
@@ -142,7 +169,7 @@ const iteePackageConfigurationsDirectory = join( iteePackageRootDirectory, 'conf
142
169
  const iteePackageNodeModulesDirectory = join( iteePackageRootDirectory, 'node_modules' )
143
170
  const iteePackageSourcesDirectory = join( iteePackageRootDirectory, 'sources' )
144
171
 
145
- const packageRootDirectory = iteePackageRootDirectory.includes('node_modules') ? join( iteePackageRootDirectory, '../../' ) : iteePackageRootDirectory
172
+ const packageRootDirectory = iteePackageRootDirectory.includes( 'node_modules' ) ? join( iteePackageRootDirectory, '../../' ) : iteePackageRootDirectory
146
173
  const packageTasksDirectory = join( packageRootDirectory, '.tasks' )
147
174
  const packageTasksConfigurationsDirectory = join( packageTasksDirectory, 'configs' )
148
175
  const packageNodeModulesDirectory = join( packageRootDirectory, 'node_modules' )
@@ -281,20 +308,12 @@ async function parallelizeTasksFrom( taskFiles = [] ) {
281
308
 
282
309
  ///
283
310
 
284
- function logLoadingTask( filename, task, configurationPath ) {
311
+ function logLoadingTask( filename ) {
285
312
 
286
313
  const taskPath = relative( packageRootDirectory, filename )
314
+ const taskName = basename( filename, '.task.mjs' )
287
315
 
288
- let logValue = `Loading ${ green( taskPath ) } with task ${ blue( task.displayName ) }`
289
-
290
- if ( configurationPath ) {
291
-
292
- const relativeConfigurationPath = relative( packageRootDirectory, configurationPath )
293
- logValue += ` and configuration from ${ cyan( relativeConfigurationPath ) }`
294
-
295
- }
296
-
297
- log( logValue )
316
+ log( `Loading ${ green( taskPath ) } with task ${ blue( taskName ) }` )
298
317
 
299
318
  }
300
319
 
@@ -344,8 +363,8 @@ class Indenter {
344
363
  export {
345
364
  createDirectoryIfNotExist,
346
365
  getJsonFrom,
347
- getConfigurationPathFor,
348
- getConfigurationFrom,
366
+ getTaskConfigurationPathFor,
367
+ getTaskConfigurationFor,
349
368
  createFile,
350
369
  getFilesFrom,
351
370
 
@@ -1,25 +1,24 @@
1
1
  import colors from 'ansi-colors'
2
2
  import log from 'fancy-log'
3
- import { join } from 'path'
3
+ import { basename } from 'node:path'
4
4
  import { rollup } from 'rollup'
5
5
  import {
6
- getConfigurationFrom,
7
- getConfigurationPathFor,
6
+ getTaskConfigurationFor,
8
7
  logLoadingTask
9
8
  } from '../_utils.mjs'
10
9
 
10
+ logLoadingTask( import.meta.filename )
11
+
11
12
  const {
12
13
  red,
13
14
  green,
14
15
  yellow,
15
16
  } = colors
16
17
 
17
- const configurationLocation = join( 'builds', 'build.conf.mjs' )
18
- const configurationPath = getConfigurationPathFor( configurationLocation )
19
-
20
18
  const buildTask = async ( done ) => {
21
19
 
22
- const configuration = await getConfigurationFrom( configurationPath )
20
+ const configuration = await getTaskConfigurationFor( import.meta.filename )
21
+
23
22
  for ( let config of configuration ) {
24
23
 
25
24
  if ( config === undefined || config === null || config.length === 0 ) {
@@ -46,10 +45,8 @@ const buildTask = async ( done ) => {
46
45
  done()
47
46
 
48
47
  }
49
- buildTask.displayName = 'build'
48
+ buildTask.displayName = basename( import.meta.filename, '.task.mjs' )
50
49
  buildTask.description = 'Todo...'
51
50
  buildTask.flags = null
52
51
 
53
- logLoadingTask( import.meta.filename, buildTask, configurationPath )
54
-
55
52
  export { buildTask }
@@ -1,18 +1,16 @@
1
1
  import colors from 'ansi-colors'
2
2
  import { deleteAsync } from 'del'
3
3
  import log from 'fancy-log'
4
- import { join } from 'path'
4
+ import { basename } from 'node:path'
5
5
  import {
6
- getConfigurationFrom,
7
- getConfigurationPathFor,
6
+ getTaskConfigurationFor,
8
7
  logLoadingTask
9
8
  } from '../_utils.mjs'
10
9
 
11
- const { red } = colors
10
+ logLoadingTask( import.meta.filename )
12
11
 
13
- const configurationLocation = join( 'cleans', 'clean.conf.mjs' )
14
- const configurationPath = getConfigurationPathFor( configurationLocation )
15
- const configuration = await getConfigurationFrom( configurationPath )
12
+ const { red } = colors
13
+ const configuration = await getTaskConfigurationFor( import.meta.filename )
16
14
 
17
15
  /**
18
16
  * @method npm run clean
@@ -27,10 +25,8 @@ const cleanTask = () => deleteAsync( configuration, {
27
25
  log( `Deleting [${ progress.deletedCount }/${ progress.totalCount }]<${ percent }%>${ spacer }:`, red( path ) )
28
26
  }
29
27
  } )
30
- cleanTask.displayName = 'clean'
28
+ cleanTask.displayName = basename( import.meta.filename, '.task.mjs' )
31
29
  cleanTask.description = 'Will delete builds and temporary folders'
32
30
  cleanTask.flags = null
33
31
 
34
- logLoadingTask( import.meta.filename, cleanTask, configurationPath )
35
-
36
32
  export { cleanTask }
@@ -1,19 +1,18 @@
1
1
  import colors from 'ansi-colors'
2
2
  import log from 'fancy-log'
3
3
  import child_process from 'node:child_process'
4
+ import { basename } from 'node:path'
4
5
  import { promisify } from 'node:util'
5
- import { join } from 'path'
6
6
  import {
7
- getConfigurationPathFor,
7
+ getTaskConfigurationPathFor,
8
8
  logLoadingTask
9
9
  } from '../_utils.mjs'
10
10
 
11
+ logLoadingTask( import.meta.filename )
12
+
11
13
  const execFile = promisify( child_process.execFile )
12
14
  const { red } = colors
13
15
 
14
- const configurationLocation = join( 'docs', 'doc.conf.json' )
15
- const configurationPath = getConfigurationPathFor( configurationLocation )
16
-
17
16
  /**
18
17
  * @method npm run doc
19
18
  * @global
@@ -23,6 +22,8 @@ const docTask = async ( done ) => {
23
22
 
24
23
  try {
25
24
 
25
+ const configurationPath = getTaskConfigurationPathFor( import.meta.filename )
26
+
26
27
  const { stdout } = await execFile(
27
28
  './node_modules/.bin/jsdoc',
28
29
  [
@@ -40,10 +41,8 @@ const docTask = async ( done ) => {
40
41
  }
41
42
 
42
43
  }
43
- docTask.displayName = 'doc'
44
+ docTask.displayName = basename( import.meta.filename, '.task.mjs' )
44
45
  docTask.description = 'Will generate this documentation.'
45
46
  docTask.flags = null
46
47
 
47
- logLoadingTask( import.meta.filename, docTask, configurationPath )
48
-
49
48
  export { docTask }
@@ -1,5 +1,6 @@
1
1
  import colors from 'ansi-colors'
2
2
  import log from 'fancy-log'
3
+ import { basename } from 'node:path'
3
4
  import {
4
5
  getPrettyNodeVersion,
5
6
  getPrettyNpmVersion,
@@ -9,6 +10,8 @@ import {
9
10
  logLoadingTask
10
11
  } from '../_utils.mjs'
11
12
 
13
+ logLoadingTask( import.meta.filename )
14
+
12
15
  const {
13
16
  red,
14
17
  green,
@@ -145,10 +148,8 @@ const helpTask = ( done ) => {
145
148
  done()
146
149
 
147
150
  }
148
- helpTask.displayName = 'help'
151
+ helpTask.displayName = basename( import.meta.filename, '.task.mjs' )
149
152
  helpTask.description = 'Display the package help'
150
153
  helpTask.flags = null
151
154
 
152
- logLoadingTask( import.meta.filename, helpTask )
153
-
154
155
  export { helpTask }
@@ -1,18 +1,17 @@
1
1
  import colors from 'ansi-colors'
2
2
  import log from 'fancy-log'
3
3
  import child_process from 'node:child_process'
4
+ import { basename } from 'node:path'
4
5
  import { promisify } from 'node:util'
5
- import { join } from 'path'
6
6
  import {
7
- getConfigurationPathFor,
7
+ getTaskConfigurationPathFor,
8
8
  logLoadingTask
9
9
  } from '../_utils.mjs'
10
10
 
11
- const execFile = promisify( child_process.execFile )
12
- const { red } = colors
11
+ logLoadingTask( import.meta.filename )
13
12
 
14
- const configurationLocation = join( 'lints', 'lint.conf.mjs' )
15
- const configurationPath = getConfigurationPathFor( configurationLocation )
13
+ const execFile = promisify( child_process.execFile )
14
+ const { red } = colors
16
15
 
17
16
  /**
18
17
  * @method npm run lint
@@ -23,6 +22,8 @@ const lintTask = async ( done ) => {
23
22
 
24
23
  try {
25
24
 
25
+ const configurationPath = getTaskConfigurationPathFor( import.meta.filename )
26
+
26
27
  const { stdout } = await execFile( 'npx', [ 'eslint', '--config', configurationPath, '--fix' ] )
27
28
  if ( stdout !== '' ) {
28
29
  log( stdout )
@@ -38,10 +39,8 @@ const lintTask = async ( done ) => {
38
39
  }
39
40
 
40
41
  }
41
- lintTask.displayName = 'lint'
42
+ lintTask.displayName = basename( import.meta.filename, '.task.mjs' )
42
43
  lintTask.description = 'Will lint the sources files and try to fix the style when possible.'
43
44
  lintTask.flags = null
44
45
 
45
- logLoadingTask( import.meta.filename, lintTask, configurationPath )
46
-
47
46
  export { lintTask }
@@ -7,9 +7,8 @@ import {
7
7
  relative
8
8
  } from 'path'
9
9
  import {
10
- getConfigurationFrom,
11
- getConfigurationPathFor,
12
10
  getFilesFrom,
11
+ getTaskConfigurationFor,
13
12
  iteePackageRootDirectory,
14
13
  iteePackageSourcesDirectory,
15
14
  packageNodeModulesDirectory,
@@ -22,8 +21,7 @@ const {
22
21
  yellow
23
22
  } = colors
24
23
 
25
- const configurationPath = getConfigurationPathFor( 'refresh.conf.mjs' )
26
- const configuration = await getConfigurationFrom( configurationPath )
24
+ const configuration = await getTaskConfigurationFor( import.meta.filename )
27
25
 
28
26
  // Get and filter tasks to expose
29
27
  const defaultTaskPattern = join( iteePackageSourcesDirectory, '/{*.task.mjs,**/*.task.mjs,**/**/*.task.mjs}' )
@@ -88,7 +86,9 @@ for ( const taskFile of defaultTaskFiles ) {
88
86
  gulpfileContent += '\n'
89
87
 
90
88
  // Generate user tasks exports and append to gulpfile content
91
- gulpfileContent += '// User defined tasks\n'
89
+ if ( userTaskFiles.length > 0 ) {
90
+ gulpfileContent += '// User defined tasks\n'
91
+ }
92
92
  for ( const taskFile of userTaskFiles ) {
93
93
  const relativeTaskFile = relative( packageRootDirectory, taskFile )
94
94
  gulpfileContent += `export * from './${ relativeTaskFile }'\n`
@@ -1,4 +1,5 @@
1
1
  import { series } from 'gulp'
2
+ import { basename } from 'node:path'
2
3
  import { logLoadingTask } from '../_utils.mjs'
3
4
  import { buildTask } from '../builds/build.task.mjs'
4
5
  import { cleanTask } from '../cleans/clean.task.mjs'
@@ -8,6 +9,8 @@ import { computeBenchmarksTask } from '../tests/benchmarks/compute-benchmarks.ta
8
9
  import { runTestsTask } from '../tests/run-tests.task.mjs'
9
10
  import { computeUnitTestsTask } from '../tests/units/compute-unit-tests.task.mjs'
10
11
 
12
+ logLoadingTask( import.meta.filename )
13
+
11
14
  /**
12
15
  * @method npm run release
13
16
  * @global
@@ -22,10 +25,8 @@ const releaseTask = series(
22
25
  lintTask,
23
26
  docTask,
24
27
  )
25
- releaseTask.displayName = 'release'
28
+ releaseTask.displayName = basename( import.meta.filename, '.task.mjs' )
26
29
  releaseTask.description = 'Will perform a complete release of the library including \'clean\', \'lint\', \'doc\', \'test\' and finally \'build\'.'
27
30
  releaseTask.flags = null
28
31
 
29
- logLoadingTask( import.meta.filename, releaseTask )
30
-
31
32
  export { releaseTask }