@itee/tasks 1.3.0 → 1.3.1
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.
- package/CHANGELOG.md +6 -0
- package/configs/lints/lint.conf.mjs +40 -8
- package/docs/-_utils.mjs.html +68 -18
- package/docs/cleans_clean.task.mjs.html +2 -2
- package/docs/global.html +7 -7
- package/docs/helps_help.task.mjs.html +7 -45
- package/docs/index.html +2 -2
- package/docs/lints_lint.task.mjs.html +6 -5
- package/docs/patches_patch.task.mjs.html +3 -9
- package/docs/quicksearch.html +1 -1
- package/docs/releases_release.task.mjs.html +2 -2
- package/docs/tests_benchmarks_compute-benchmarks.task.mjs.html +2 -2
- package/docs/tests_benchmarks_run-benchmarks-for-backend.task.mjs.html +2 -2
- package/docs/tests_benchmarks_run-benchmarks-for-frontend.task.mjs.html +14 -12
- package/docs/tests_bundlings_check-bundling-from-esm-files-direct.task.mjs.html +2 -2
- package/docs/tests_bundlings_check-bundling.task.mjs.html +2 -2
- package/docs/tests_run-tests.task.mjs.html +2 -2
- package/docs/tests_units_compute-unit-tests.task.mjs.html +3 -3
- package/docs/tests_units_run-unit-tests-for-backend.task.mjs.html +2 -2
- package/docs/tests_units_run-unit-tests-for-frontend.task.mjs.html +14 -12
- package/package.json +1 -1
- package/sources/_utils.mjs +66 -16
- package/sources/builds/build.task.mjs +1 -1
- package/sources/helps/help.task.mjs +5 -43
- package/sources/index.mjs +17 -17
- package/sources/lints/lint.task.mjs +4 -3
- package/sources/patches/patch.task.mjs +0 -6
- package/sources/tests/benchmarks/run-benchmarks-for-frontend.task.mjs +12 -10
- package/sources/tests/units/compute-unit-tests.task.mjs +1 -1
- package/sources/tests/units/run-unit-tests-for-frontend.task.mjs +12 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
# [v1.3.1](https://github.com/Itee/tasks/compare/v1.3.0...v1.3.1) (2026-01-19)
|
|
2
|
+
|
|
3
|
+
## 🐛 Bug Fixes
|
|
4
|
+
- [`4a4d051`](https://github.com/Itee/tasks/commit/4a4d051) (lint) fix lint conf files minimatch patterns and log
|
|
5
|
+
- [`46637b7`](https://github.com/Itee/tasks/commit/46637b7) (lint) apply global lint fix
|
|
6
|
+
|
|
1
7
|
# [v1.3.0](https://github.com/Itee/tasks/compare/v1.2.1...v1.3.0) (2026-01-19)
|
|
2
8
|
|
|
3
9
|
## ✨ New Features
|
|
@@ -51,7 +51,11 @@ class RulesSet {
|
|
|
51
51
|
|
|
52
52
|
const sourceRulesSet = new RulesSet( {
|
|
53
53
|
name: 'sources',
|
|
54
|
-
files: [
|
|
54
|
+
files: [
|
|
55
|
+
'sources/**/*.js',
|
|
56
|
+
'sources/**/*.cjs',
|
|
57
|
+
'sources/**/*.mjs',
|
|
58
|
+
],
|
|
55
59
|
ignores: [],
|
|
56
60
|
plugins: { js },
|
|
57
61
|
extends: [ 'js/recommended' ],
|
|
@@ -91,7 +95,11 @@ const sourceRulesSet = new RulesSet( {
|
|
|
91
95
|
|
|
92
96
|
const sourceCommonRulesSet = new RulesSet( {
|
|
93
97
|
name: 'sources/common',
|
|
94
|
-
files: [
|
|
98
|
+
files: [
|
|
99
|
+
'sources/common/**/*.js',
|
|
100
|
+
'sources/common/**/*.cjs',
|
|
101
|
+
'sources/common/**/*.mjs',
|
|
102
|
+
],
|
|
95
103
|
ignores: [],
|
|
96
104
|
plugins: { js },
|
|
97
105
|
extends: [ 'js/recommended' ],
|
|
@@ -131,7 +139,10 @@ const sourceCommonRulesSet = new RulesSet( {
|
|
|
131
139
|
|
|
132
140
|
const sourceFrontendRulesSet = new RulesSet( {
|
|
133
141
|
name: 'sources/frontend',
|
|
134
|
-
files: [
|
|
142
|
+
files: [
|
|
143
|
+
'sources/frontend/**/*.js',
|
|
144
|
+
'sources/frontend/**/*.mjs',
|
|
145
|
+
],
|
|
135
146
|
ignores: [],
|
|
136
147
|
plugins: { js },
|
|
137
148
|
extends: [ 'js/recommended' ],
|
|
@@ -140,7 +151,11 @@ const sourceFrontendRulesSet = new RulesSet( {
|
|
|
140
151
|
|
|
141
152
|
const sourceBackendRulesSet = new RulesSet( {
|
|
142
153
|
name: 'sources/backend',
|
|
143
|
-
files: [
|
|
154
|
+
files: [
|
|
155
|
+
'sources/frontend/**/*.js',
|
|
156
|
+
'sources/frontend/**/*.cjs',
|
|
157
|
+
'sources/frontend/**/*.mjs',
|
|
158
|
+
],
|
|
144
159
|
ignores: [],
|
|
145
160
|
plugins: { js },
|
|
146
161
|
extends: [ 'js/recommended' ],
|
|
@@ -149,7 +164,11 @@ const sourceBackendRulesSet = new RulesSet( {
|
|
|
149
164
|
|
|
150
165
|
const testBenchmarksRulesSet = new RulesSet( {
|
|
151
166
|
name: 'tests/benchmarks',
|
|
152
|
-
files: [
|
|
167
|
+
files: [
|
|
168
|
+
'tests/benchmarks/**/*.js',
|
|
169
|
+
'tests/benchmarks/**/*.cjs',
|
|
170
|
+
'tests/benchmarks/**/*.mjs',
|
|
171
|
+
],
|
|
153
172
|
ignores: [],
|
|
154
173
|
plugins: { js },
|
|
155
174
|
extends: [ 'js/recommended' ],
|
|
@@ -162,7 +181,11 @@ const testBenchmarksRulesSet = new RulesSet( {
|
|
|
162
181
|
|
|
163
182
|
const testUnitsRulesSet = new RulesSet( {
|
|
164
183
|
name: 'tests/units',
|
|
165
|
-
files: [
|
|
184
|
+
files: [
|
|
185
|
+
'tests/units/**/*.js',
|
|
186
|
+
'tests/units/**/*.cjs',
|
|
187
|
+
'tests/units/**/*.mjs',
|
|
188
|
+
],
|
|
166
189
|
ignores: [],
|
|
167
190
|
plugins: { js },
|
|
168
191
|
extends: [ 'js/recommended' ],
|
|
@@ -175,7 +198,11 @@ const testUnitsRulesSet = new RulesSet( {
|
|
|
175
198
|
} )
|
|
176
199
|
|
|
177
200
|
const mochaRecommendedRulesSet = new RulesSet( {
|
|
178
|
-
files: [
|
|
201
|
+
files: [
|
|
202
|
+
'tests/units/**/*.js',
|
|
203
|
+
'tests/units/**/*.cjs',
|
|
204
|
+
'tests/units/**/*.mjs',
|
|
205
|
+
],
|
|
179
206
|
ignores: [],
|
|
180
207
|
...mocha.configs.recommended,
|
|
181
208
|
} )
|
|
@@ -229,7 +256,12 @@ const defaultConfigurator = new Configurator( {
|
|
|
229
256
|
reportUnusedDisableDirectives: 'error',
|
|
230
257
|
reportUnusedInlineConfigs: 'error'
|
|
231
258
|
},
|
|
232
|
-
rulesSets: [
|
|
259
|
+
rulesSets: [
|
|
260
|
+
sourceRulesSet,
|
|
261
|
+
testBenchmarksRulesSet,
|
|
262
|
+
testUnitsRulesSet,
|
|
263
|
+
mochaRecommendedRulesSet
|
|
264
|
+
]
|
|
233
265
|
} )
|
|
234
266
|
|
|
235
267
|
const defaultConfiguration = defaultConfigurator.getConfig()
|
package/docs/-_utils.mjs.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width">
|
|
7
|
-
<title>@itee/tasks v1.
|
|
7
|
+
<title>@itee/tasks v1.3.0 Source: _utils.mjs</title>
|
|
8
8
|
|
|
9
9
|
<!--[if lt IE 9]>
|
|
10
10
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<div class="navbar navbar-default navbar-fixed-top ">
|
|
21
21
|
<div class="container">
|
|
22
22
|
<div class="navbar-header">
|
|
23
|
-
<a class="navbar-brand" href="index.html">@itee/tasks v1.
|
|
23
|
+
<a class="navbar-brand" href="index.html">@itee/tasks v1.3.0</a>
|
|
24
24
|
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
|
|
25
25
|
<span class="icon-bar"></span>
|
|
26
26
|
<span class="icon-bar"></span>
|
|
@@ -105,12 +105,13 @@ const {
|
|
|
105
105
|
yellow,
|
|
106
106
|
blue,
|
|
107
107
|
magenta,
|
|
108
|
-
cyan
|
|
108
|
+
cyan,
|
|
109
|
+
unstyle
|
|
109
110
|
} = colors
|
|
110
111
|
|
|
111
112
|
/// Debugging
|
|
112
|
-
|
|
113
|
-
const isDebugging = ( process.env.RUNNER_DEBUG && process.env.RUNNER_DEBUG === '1' )
|
|
113
|
+
/* global process */
|
|
114
|
+
const isDebugging = ( process && process.env && process.env.RUNNER_DEBUG && process.env.RUNNER_DEBUG === '1' )
|
|
114
115
|
|
|
115
116
|
/// Package paths and data
|
|
116
117
|
|
|
@@ -250,7 +251,7 @@ function createFile( filePath, fileContent ) {
|
|
|
250
251
|
|
|
251
252
|
}
|
|
252
253
|
|
|
253
|
-
function getFilesFrom( globPattern, filter = ( any ) => true ) {
|
|
254
|
+
function getFilesFrom( globPattern, filter = ( /*any*/ ) => true ) {
|
|
254
255
|
|
|
255
256
|
return glob.sync( globPattern )
|
|
256
257
|
.map( filePath => normalize( filePath ) )
|
|
@@ -465,9 +466,15 @@ function computeBannerFor( format ) {
|
|
|
465
466
|
|
|
466
467
|
}
|
|
467
468
|
|
|
468
|
-
function computeIntroFor( requestPackages ) {
|
|
469
|
+
function computeIntroFor( requestPackages = [] ) {
|
|
470
|
+
|
|
471
|
+
let intro = ''
|
|
472
|
+
|
|
473
|
+
for ( const requestPackage of requestPackages ) {
|
|
474
|
+
intro += `if( ${ requestPackage } === undefined ) { throw new Error('${ getPrettyPackageName() } need ${ requestPackage } to be defined first. Please check your scripts loading order.') }` + '\n'
|
|
475
|
+
}
|
|
469
476
|
|
|
470
|
-
return
|
|
477
|
+
return intro
|
|
471
478
|
|
|
472
479
|
}
|
|
473
480
|
|
|
@@ -527,11 +534,11 @@ function createRollupConfigs( options = undefined ) {
|
|
|
527
534
|
const outputPath = ( isProd ) ? join( output, `${ fileName }.min.${ extension }` ) : join( output, `${ fileName }.${ extension }` )
|
|
528
535
|
|
|
529
536
|
configs.push( {
|
|
530
|
-
input:
|
|
531
|
-
external:
|
|
537
|
+
input: input,
|
|
538
|
+
external: ( format === 'cjs' ) ? [
|
|
532
539
|
'fs'
|
|
533
540
|
] : [],
|
|
534
|
-
plugins:
|
|
541
|
+
plugins: [
|
|
535
542
|
replace( {
|
|
536
543
|
defines: {
|
|
537
544
|
IS_REMOVE_ON_BUILD: false,
|
|
@@ -546,7 +553,7 @@ function createRollupConfigs( options = undefined ) {
|
|
|
546
553
|
} ),
|
|
547
554
|
isProd && terser()
|
|
548
555
|
],
|
|
549
|
-
onwarn:
|
|
556
|
+
onwarn: ( {
|
|
550
557
|
loc,
|
|
551
558
|
frame,
|
|
552
559
|
message
|
|
@@ -556,11 +563,11 @@ function createRollupConfigs( options = undefined ) {
|
|
|
556
563
|
if ( message.includes( 'Circular dependency' ) ) { return }
|
|
557
564
|
if ( message.includes( 'plugin uglify is deprecated' ) ) { return }
|
|
558
565
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
566
|
+
let errorMessage = ( loc )
|
|
567
|
+
? `/!\\ ${ loc.file } (${ loc.line }:${ loc.column }) ${ frame } ${ message }\n`
|
|
568
|
+
: `/!\\ ${ message }\n`
|
|
569
|
+
|
|
570
|
+
log( red( errorMessage ) )
|
|
564
571
|
|
|
565
572
|
},
|
|
566
573
|
treeshake: treeshake,
|
|
@@ -611,7 +618,47 @@ function logLoadingTask( filename ) {
|
|
|
611
618
|
|
|
612
619
|
}
|
|
613
620
|
|
|
614
|
-
///
|
|
621
|
+
/// Text Management
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
function alignTextCenter( text, width ) {
|
|
625
|
+
|
|
626
|
+
const unstyledText = unstyle( text.repeat( 1 ) )
|
|
627
|
+
const marginLength = ( width - unstyledText.length ) / 2
|
|
628
|
+
|
|
629
|
+
let leftMargin, rightMargin
|
|
630
|
+
if ( Number.isInteger( marginLength ) ) {
|
|
631
|
+
leftMargin = marginLength
|
|
632
|
+
rightMargin = marginLength
|
|
633
|
+
} else {
|
|
634
|
+
const flooredMargin = Math.floor( marginLength )
|
|
635
|
+
leftMargin = flooredMargin
|
|
636
|
+
rightMargin = flooredMargin + 1
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
return ' '.repeat( leftMargin ) + text + ' '.repeat( rightMargin )
|
|
640
|
+
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
function alignTextLeft( text, width ) {
|
|
644
|
+
|
|
645
|
+
const unstyledText = unstyle( text.repeat( 1 ) )
|
|
646
|
+
let repeatTime = width - unstyledText.length
|
|
647
|
+
repeatTime = ( repeatTime > 0 ) ? repeatTime : 0
|
|
648
|
+
|
|
649
|
+
return text + ' '.repeat( repeatTime )
|
|
650
|
+
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
function alignTextRight( text, width ) {
|
|
654
|
+
|
|
655
|
+
const unstyledText = unstyle( text.repeat( 1 ) )
|
|
656
|
+
let repeatTime = width - unstyledText.length
|
|
657
|
+
repeatTime = ( repeatTime > 0 ) ? repeatTime : 0
|
|
658
|
+
|
|
659
|
+
return ' '.repeat( repeatTime ) + text
|
|
660
|
+
|
|
661
|
+
}
|
|
615
662
|
|
|
616
663
|
function IndenterFactory( indentationChar = '\t', indentationLevel = 5 ) {
|
|
617
664
|
|
|
@@ -710,6 +757,9 @@ export {
|
|
|
710
757
|
|
|
711
758
|
logLoadingTask,
|
|
712
759
|
|
|
760
|
+
alignTextCenter,
|
|
761
|
+
alignTextLeft,
|
|
762
|
+
alignTextRight,
|
|
713
763
|
IndenterFactory as Indenter
|
|
714
764
|
}</pre>
|
|
715
765
|
</article>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width">
|
|
7
|
-
<title>@itee/tasks v1.
|
|
7
|
+
<title>@itee/tasks v1.3.0 Source: cleans/clean.task.mjs</title>
|
|
8
8
|
|
|
9
9
|
<!--[if lt IE 9]>
|
|
10
10
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<div class="navbar navbar-default navbar-fixed-top ">
|
|
21
21
|
<div class="container">
|
|
22
22
|
<div class="navbar-header">
|
|
23
|
-
<a class="navbar-brand" href="index.html">@itee/tasks v1.
|
|
23
|
+
<a class="navbar-brand" href="index.html">@itee/tasks v1.3.0</a>
|
|
24
24
|
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
|
|
25
25
|
<span class="icon-bar"></span>
|
|
26
26
|
<span class="icon-bar"></span>
|
package/docs/global.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width">
|
|
7
|
-
<title>@itee/tasks v1.
|
|
7
|
+
<title>@itee/tasks v1.3.0 Global</title>
|
|
8
8
|
|
|
9
9
|
<!--[if lt IE 9]>
|
|
10
10
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<div class="navbar navbar-default navbar-fixed-top ">
|
|
21
21
|
<div class="container">
|
|
22
22
|
<div class="navbar-header">
|
|
23
|
-
<a class="navbar-brand" href="index.html">@itee/tasks v1.
|
|
23
|
+
<a class="navbar-brand" href="index.html">@itee/tasks v1.3.0</a>
|
|
24
24
|
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
|
|
25
25
|
<span class="icon-bar"></span>
|
|
26
26
|
<span class="icon-bar"></span>
|
|
@@ -589,7 +589,7 @@ Todo: Check for different target env like next task below this one
|
|
|
589
589
|
<ul class="dummy">
|
|
590
590
|
<li>
|
|
591
591
|
<a href="-_utils.mjs.html">_utils.mjs</a>,
|
|
592
|
-
<a href="-_utils.mjs.html#sunlight-1-line-
|
|
592
|
+
<a href="-_utils.mjs.html#sunlight-1-line-432">line 432</a>
|
|
593
593
|
</li>
|
|
594
594
|
</ul>
|
|
595
595
|
</dd>
|
|
@@ -789,7 +789,7 @@ Todo: Check for different target env like next task below this one
|
|
|
789
789
|
<ul class="dummy">
|
|
790
790
|
<li>
|
|
791
791
|
<a href="helps_help.task.mjs.html">helps/help.task.mjs</a>,
|
|
792
|
-
<a href="helps_help.task.mjs.html#sunlight-1-line-
|
|
792
|
+
<a href="helps_help.task.mjs.html#sunlight-1-line-26">line 26</a>
|
|
793
793
|
</li>
|
|
794
794
|
</ul>
|
|
795
795
|
</dd>
|
|
@@ -965,7 +965,7 @@ Todo: Check for different target env like next task below this one
|
|
|
965
965
|
<ul class="dummy">
|
|
966
966
|
<li>
|
|
967
967
|
<a href="patches_patch.task.mjs.html">patches/patch.task.mjs</a>,
|
|
968
|
-
<a href="patches_patch.task.mjs.html#sunlight-1-line-
|
|
968
|
+
<a href="patches_patch.task.mjs.html#sunlight-1-line-10">line 10</a>
|
|
969
969
|
</li>
|
|
970
970
|
</ul>
|
|
971
971
|
</dd>
|
|
@@ -1262,7 +1262,7 @@ Todo: Check for different target env like next task below this one
|
|
|
1262
1262
|
|
|
1263
1263
|
<hr>
|
|
1264
1264
|
<dt>
|
|
1265
|
-
<h4 class="name" id="runBenchmarksForFrontendTask"><span class="type-signature"
|
|
1265
|
+
<h4 class="name" id="runBenchmarksForFrontendTask"><span class="type-signature"><async> </span>runBenchmarksForFrontendTask()</h4>
|
|
1266
1266
|
|
|
1267
1267
|
|
|
1268
1268
|
</dt>
|
|
@@ -1438,7 +1438,7 @@ Todo: Check for different target env like next task below this one
|
|
|
1438
1438
|
|
|
1439
1439
|
<hr>
|
|
1440
1440
|
<dt>
|
|
1441
|
-
<h4 class="name" id="runUnitTestsForFrontendTask"><span class="type-signature"
|
|
1441
|
+
<h4 class="name" id="runUnitTestsForFrontendTask"><span class="type-signature"><async> </span>runUnitTestsForFrontendTask()</h4>
|
|
1442
1442
|
|
|
1443
1443
|
|
|
1444
1444
|
</dt>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width">
|
|
7
|
-
<title>@itee/tasks v1.
|
|
7
|
+
<title>@itee/tasks v1.3.0 Source: helps/help.task.mjs</title>
|
|
8
8
|
|
|
9
9
|
<!--[if lt IE 9]>
|
|
10
10
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<div class="navbar navbar-default navbar-fixed-top ">
|
|
21
21
|
<div class="container">
|
|
22
22
|
<div class="navbar-header">
|
|
23
|
-
<a class="navbar-brand" href="index.html">@itee/tasks v1.
|
|
23
|
+
<a class="navbar-brand" href="index.html">@itee/tasks v1.3.0</a>
|
|
24
24
|
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
|
|
25
25
|
<span class="icon-bar"></span>
|
|
26
26
|
<span class="icon-bar"></span>
|
|
@@ -74,12 +74,14 @@
|
|
|
74
74
|
import log from 'fancy-log'
|
|
75
75
|
import { basename } from 'node:path'
|
|
76
76
|
import {
|
|
77
|
+
Indenter,
|
|
78
|
+
alignTextCenter,
|
|
79
|
+
alignTextLeft,
|
|
77
80
|
getPrettyNodeVersion,
|
|
78
81
|
getPrettyNpmVersion,
|
|
79
82
|
getPrettyPackageName,
|
|
80
83
|
getPrettyPackageVersion,
|
|
81
|
-
|
|
82
|
-
logLoadingTask
|
|
84
|
+
logLoadingTask,
|
|
83
85
|
} from '../_utils.mjs'
|
|
84
86
|
|
|
85
87
|
logLoadingTask( import.meta.filename )
|
|
@@ -90,49 +92,9 @@ const {
|
|
|
90
92
|
blue,
|
|
91
93
|
cyan,
|
|
92
94
|
yellow,
|
|
93
|
-
magenta
|
|
94
|
-
unstyle
|
|
95
|
+
magenta
|
|
95
96
|
} = colors
|
|
96
97
|
|
|
97
|
-
function alignTextCenter( text, width ) {
|
|
98
|
-
|
|
99
|
-
const unstyledText = unstyle( text.repeat( 1 ) )
|
|
100
|
-
const marginLength = ( width - unstyledText.length ) / 2
|
|
101
|
-
|
|
102
|
-
let leftMargin, rightMargin
|
|
103
|
-
if ( Number.isInteger( marginLength ) ) {
|
|
104
|
-
leftMargin = marginLength
|
|
105
|
-
rightMargin = marginLength
|
|
106
|
-
} else {
|
|
107
|
-
const flooredMargin = Math.floor( marginLength )
|
|
108
|
-
leftMargin = flooredMargin
|
|
109
|
-
rightMargin = flooredMargin + 1
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
return ' '.repeat( leftMargin ) + text + ' '.repeat( rightMargin )
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function alignTextLeft( text, width ) {
|
|
117
|
-
|
|
118
|
-
const unstyledText = unstyle( text.repeat( 1 ) )
|
|
119
|
-
let repeatTime = width - unstyledText.length
|
|
120
|
-
repeatTime = ( repeatTime > 0 ) ? repeatTime : 0
|
|
121
|
-
|
|
122
|
-
return text + ' '.repeat( repeatTime )
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function alignTextRight( text, width ) {
|
|
127
|
-
|
|
128
|
-
const unstyledText = unstyle( text.repeat( 1 ) )
|
|
129
|
-
let repeatTime = width - unstyledText.length
|
|
130
|
-
repeatTime = ( repeatTime > 0 ) ? repeatTime : 0
|
|
131
|
-
|
|
132
|
-
return ' '.repeat( repeatTime ) + text
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
136
98
|
/**
|
|
137
99
|
* @method npm run help ( default )
|
|
138
100
|
* @global
|
package/docs/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width">
|
|
7
|
-
<title>@itee/tasks v1.
|
|
7
|
+
<title>@itee/tasks v1.3.0 Index</title>
|
|
8
8
|
|
|
9
9
|
<!--[if lt IE 9]>
|
|
10
10
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<div class="navbar navbar-default navbar-fixed-top ">
|
|
21
21
|
<div class="container">
|
|
22
22
|
<div class="navbar-header">
|
|
23
|
-
<a class="navbar-brand" href="index.html">@itee/tasks v1.
|
|
23
|
+
<a class="navbar-brand" href="index.html">@itee/tasks v1.3.0</a>
|
|
24
24
|
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
|
|
25
25
|
<span class="icon-bar"></span>
|
|
26
26
|
<span class="icon-bar"></span>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width">
|
|
7
|
-
<title>@itee/tasks v1.
|
|
7
|
+
<title>@itee/tasks v1.3.0 Source: lints/lint.task.mjs</title>
|
|
8
8
|
|
|
9
9
|
<!--[if lt IE 9]>
|
|
10
10
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<div class="navbar navbar-default navbar-fixed-top ">
|
|
21
21
|
<div class="container">
|
|
22
22
|
<div class="navbar-header">
|
|
23
|
-
<a class="navbar-brand" href="index.html">@itee/tasks v1.
|
|
23
|
+
<a class="navbar-brand" href="index.html">@itee/tasks v1.3.0</a>
|
|
24
24
|
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
|
|
25
25
|
<span class="icon-bar"></span>
|
|
26
26
|
<span class="icon-bar"></span>
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
<section>
|
|
71
71
|
<article>
|
|
72
72
|
<pre
|
|
73
|
-
class="sunlight-highlight-javascript linenums">import colors
|
|
74
|
-
import log
|
|
73
|
+
class="sunlight-highlight-javascript linenums">import colors from 'ansi-colors'
|
|
74
|
+
import log from 'fancy-log'
|
|
75
75
|
import child_process from 'node:child_process'
|
|
76
76
|
import { basename } from 'node:path'
|
|
77
77
|
import { promisify } from 'node:util'
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
logLoadingTask( import.meta.filename )
|
|
84
84
|
|
|
85
85
|
const execFile = promisify( child_process.execFile )
|
|
86
|
-
const { red } = colors
|
|
86
|
+
const { red, cyan } = colors
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* @method npm run lint
|
|
@@ -95,6 +95,7 @@ const lintTask = async ( done ) => {
|
|
|
95
95
|
try {
|
|
96
96
|
|
|
97
97
|
const configurationPath = getTaskConfigurationPathFor( import.meta.filename )
|
|
98
|
+
log( `Loading configuration from ${ cyan( configurationPath ) }` )
|
|
98
99
|
|
|
99
100
|
const { stdout } = await execFile( 'npx', [ 'eslint', '--config', configurationPath, '--fix' ] )
|
|
100
101
|
if ( stdout !== '' ) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width">
|
|
7
|
-
<title>@itee/tasks v1.
|
|
7
|
+
<title>@itee/tasks v1.3.0 Source: patches/patch.task.mjs</title>
|
|
8
8
|
|
|
9
9
|
<!--[if lt IE 9]>
|
|
10
10
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<div class="navbar navbar-default navbar-fixed-top ">
|
|
21
21
|
<div class="container">
|
|
22
22
|
<div class="navbar-header">
|
|
23
|
-
<a class="navbar-brand" href="index.html">@itee/tasks v1.
|
|
23
|
+
<a class="navbar-brand" href="index.html">@itee/tasks v1.3.0</a>
|
|
24
24
|
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
|
|
25
25
|
<span class="icon-bar"></span>
|
|
26
26
|
<span class="icon-bar"></span>
|
|
@@ -70,8 +70,7 @@
|
|
|
70
70
|
<section>
|
|
71
71
|
<article>
|
|
72
72
|
<pre
|
|
73
|
-
class="sunlight-highlight-javascript linenums">import
|
|
74
|
-
import {
|
|
73
|
+
class="sunlight-highlight-javascript linenums">import {
|
|
75
74
|
readFileSync,
|
|
76
75
|
writeFileSync
|
|
77
76
|
} from 'node:fs'
|
|
@@ -80,11 +79,6 @@ import { logLoadingTask } from '../_utils.mjs'
|
|
|
80
79
|
|
|
81
80
|
logLoadingTask( import.meta.filename )
|
|
82
81
|
|
|
83
|
-
const {
|
|
84
|
-
green,
|
|
85
|
-
blue
|
|
86
|
-
} = colors
|
|
87
|
-
|
|
88
82
|
/**
|
|
89
83
|
* @method npm run patch
|
|
90
84
|
* @global
|