@itee/tasks 1.1.1 → 1.2.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 +11 -0
- package/configs/docs/doc.conf.mjs +55 -0
- package/docs/-_utils.mjs.html +848 -0
- package/docs/cleans_clean.task.mjs.html +239 -0
- package/docs/fonts/glyphicons-halflings-regular.eot +0 -0
- package/docs/fonts/glyphicons-halflings-regular.svg +288 -0
- package/docs/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/docs/fonts/glyphicons-halflings-regular.woff +0 -0
- package/docs/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/docs/global.html +1668 -0
- package/docs/helps_help.task.mjs.html +362 -0
- package/docs/img/glyphicons-halflings-white.png +0 -0
- package/docs/img/glyphicons-halflings.png +0 -0
- package/docs/index.html +228 -0
- package/docs/lints_lint.task.mjs.html +252 -0
- package/docs/patches_patch.task.mjs.html +251 -0
- package/docs/quicksearch.html +31 -0
- package/docs/releases_release.task.mjs.html +238 -0
- package/docs/scripts/docstrap.lib.js +11 -0
- package/docs/scripts/fulltext-search-ui.js +89 -0
- package/docs/scripts/fulltext-search.js +36 -0
- package/docs/scripts/lunr.min.js +6 -0
- package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/docs/scripts/prettify/jquery.min.js +6 -0
- package/docs/scripts/prettify/lang-css.js +21 -0
- package/docs/scripts/prettify/prettify.js +496 -0
- package/docs/scripts/sunlight.js +1157 -0
- package/docs/scripts/toc.js +203 -0
- package/docs/styles/darkstrap.css +960 -0
- package/docs/styles/prettify-tomorrow.css +132 -0
- package/docs/styles/site.cerulean.css +7008 -0
- package/docs/styles/site.cosmo.css +7061 -0
- package/docs/styles/site.cyborg.css +7048 -0
- package/docs/styles/site.darkly.css +7171 -0
- package/docs/styles/site.darkstrap.css +5638 -0
- package/docs/styles/site.dibs-bootstrap.css +5899 -0
- package/docs/styles/site.flatly.css +7147 -0
- package/docs/styles/site.journal.css +6973 -0
- package/docs/styles/site.lumen.css +7298 -0
- package/docs/styles/site.paper.css +7623 -0
- package/docs/styles/site.readable.css +6997 -0
- package/docs/styles/site.sandstone.css +7035 -0
- package/docs/styles/site.simplex.css +7023 -0
- package/docs/styles/site.slate.css +7343 -0
- package/docs/styles/site.spacelab.css +7055 -0
- package/docs/styles/site.superhero.css +7131 -0
- package/docs/styles/site.united.css +6895 -0
- package/docs/styles/site.yeti.css +7195 -0
- package/docs/styles/sunlight.dark.css +345 -0
- package/docs/styles/sunlight.default.css +344 -0
- package/docs/tests_benchmarks_compute-benchmarks.task.mjs.html +442 -0
- package/docs/tests_benchmarks_run-benchmarks-for-backend.task.mjs.html +249 -0
- package/docs/tests_benchmarks_run-benchmarks-for-frontend.task.mjs.html +254 -0
- package/docs/tests_bundlings_check-bundling-from-esm-files-direct.task.mjs.html +300 -0
- package/docs/tests_bundlings_check-bundling.task.mjs.html +231 -0
- package/docs/tests_run-tests.task.mjs.html +228 -0
- package/docs/tests_units_compute-unit-tests.task.mjs.html +753 -0
- package/docs/tests_units_run-unit-tests-for-backend.task.mjs.html +254 -0
- package/docs/tests_units_run-unit-tests-for-frontend.task.mjs.html +254 -0
- package/package.json +5 -2
- package/sources/_utils.mjs +19 -1
- package/sources/patches/patch.task.mjs +45 -0
- package/configs/docs/doc.conf.json +0 -1
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width">
|
|
7
|
+
<title>@itee/tasks v1.2.0 Source: tests/benchmarks/run-benchmarks-for-frontend.task.mjs</title>
|
|
8
|
+
|
|
9
|
+
<!--[if lt IE 9]>
|
|
10
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
11
|
+
<![endif]-->
|
|
12
|
+
<link type="text/css" rel="stylesheet" href="styles/sunlight.dark.css">
|
|
13
|
+
|
|
14
|
+
<link type="text/css" rel="stylesheet" href="styles/site.cyborg.css">
|
|
15
|
+
|
|
16
|
+
</head>
|
|
17
|
+
|
|
18
|
+
<body>
|
|
19
|
+
|
|
20
|
+
<div class="navbar navbar-default navbar-fixed-top ">
|
|
21
|
+
<div class="container">
|
|
22
|
+
<div class="navbar-header">
|
|
23
|
+
<a class="navbar-brand" href="index.html">@itee/tasks v1.2.0</a>
|
|
24
|
+
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
|
|
25
|
+
<span class="icon-bar"></span>
|
|
26
|
+
<span class="icon-bar"></span>
|
|
27
|
+
<span class="icon-bar"></span>
|
|
28
|
+
</button>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="navbar-collapse collapse" id="topNavigation">
|
|
31
|
+
<ul class="nav navbar-nav">
|
|
32
|
+
|
|
33
|
+
<li class="dropdown">
|
|
34
|
+
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
|
|
35
|
+
<ul class="dropdown-menu inline">
|
|
36
|
+
<li><a href="global.html#checkBundlingFromEsmFilesDirectTask">checkBundlingFromEsmFilesDirectTask</a></li><li><a href="global.html#checkBundlingTask">checkBundlingTask</a></li><li><a href="global.html#computeBenchmarksTask">computeBenchmarksTask</a></li><li><a href="global.html#computeUnitTestsTask">computeUnitTestsTask</a></li><li><a href="global.html#createRollupConfigs">createRollupConfigs</a></li><li><a href="global.html#npmrunclean">npm run clean</a></li><li><a href="global.html#npmrunhelpdefault">npm run help ( default )</a></li><li><a href="global.html#npmrunlint">npm run lint</a></li><li><a href="global.html#npmrunpatch">npm run patch</a></li><li><a href="global.html#npmrunrelease">npm run release</a></li><li><a href="global.html#npmruntest">npm run test</a></li><li><a href="global.html#runBenchmarksForBackendTask">runBenchmarksForBackendTask</a></li><li><a href="global.html#runBenchmarksForFrontendTask">runBenchmarksForFrontendTask</a></li><li><a href="global.html#runUnitTestsForBackendTask">runUnitTestsForBackendTask</a></li><li><a href="global.html#runUnitTestsForFrontendTask">runUnitTestsForFrontendTask</a></li>
|
|
37
|
+
</ul>
|
|
38
|
+
</li>
|
|
39
|
+
|
|
40
|
+
</ul>
|
|
41
|
+
|
|
42
|
+
<div class="col-sm-3 col-md-3">
|
|
43
|
+
<form class="navbar-form" role="search">
|
|
44
|
+
<div class="input-group">
|
|
45
|
+
<input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
|
|
46
|
+
<div class="input-group-btn">
|
|
47
|
+
<button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</form>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<div class="container" id="toc-content">
|
|
60
|
+
<div class="row">
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<div class="col-md-12">
|
|
64
|
+
|
|
65
|
+
<div id="main">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
<h1 class="page-title">Source: tests/benchmarks/run-benchmarks-for-frontend.task.mjs</h1>
|
|
69
|
+
|
|
70
|
+
<section>
|
|
71
|
+
<article>
|
|
72
|
+
<pre
|
|
73
|
+
class="sunlight-highlight-javascript linenums">import { startTestRunner } from '@web/test-runner'
|
|
74
|
+
import colors from 'ansi-colors'
|
|
75
|
+
import { basename } from 'node:path'
|
|
76
|
+
import {
|
|
77
|
+
getTaskConfigurationFor,
|
|
78
|
+
logLoadingTask
|
|
79
|
+
} from '../../_utils.mjs'
|
|
80
|
+
|
|
81
|
+
logLoadingTask( import.meta.filename )
|
|
82
|
+
|
|
83
|
+
const { red } = colors
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @description Will run benchmarks with web-test-runner
|
|
87
|
+
*/
|
|
88
|
+
const runBenchmarksForFrontendTask = () => {
|
|
89
|
+
return new Promise( async ( resolve, reject ) => {
|
|
90
|
+
|
|
91
|
+
const configuration = await getTaskConfigurationFor( import.meta.filename )
|
|
92
|
+
const testRunner = await startTestRunner( {
|
|
93
|
+
config: configuration,
|
|
94
|
+
readCliArgs: false,
|
|
95
|
+
readFileConfig: false,
|
|
96
|
+
autoExitProcess: false,
|
|
97
|
+
} )
|
|
98
|
+
|
|
99
|
+
if ( !testRunner ) {
|
|
100
|
+
reject( red( 'Internal test runner error.' ) )
|
|
101
|
+
return
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// To ensure that testRunner exit event won't be used by other instance of test runner,
|
|
105
|
+
// we need to be sure that current test runner is ended
|
|
106
|
+
testRunner.on( 'finished', () => {
|
|
107
|
+
testRunner.stop()
|
|
108
|
+
} )
|
|
109
|
+
|
|
110
|
+
testRunner.on( 'stopped', () => {
|
|
111
|
+
resolve()
|
|
112
|
+
} )
|
|
113
|
+
|
|
114
|
+
} )
|
|
115
|
+
}
|
|
116
|
+
runBenchmarksForFrontendTask.displayName = basename( import.meta.filename, '.task.mjs' )
|
|
117
|
+
runBenchmarksForFrontendTask.description = 'Will run benchmarks with web-test-runner.'
|
|
118
|
+
runBenchmarksForFrontendTask.flags = null
|
|
119
|
+
|
|
120
|
+
export { runBenchmarksForFrontendTask }</pre>
|
|
121
|
+
</article>
|
|
122
|
+
</section>
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div class="clearfix"></div>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
<div class="modal fade" id="searchResults">
|
|
140
|
+
<div class="modal-dialog">
|
|
141
|
+
<div class="modal-content">
|
|
142
|
+
<div class="modal-header">
|
|
143
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
144
|
+
<h4 class="modal-title">Search results</h4>
|
|
145
|
+
</div>
|
|
146
|
+
<div class="modal-body"></div>
|
|
147
|
+
<div class="modal-footer">
|
|
148
|
+
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
149
|
+
</div>
|
|
150
|
+
</div><!-- /.modal-content -->
|
|
151
|
+
</div><!-- /.modal-dialog -->
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
<footer>
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
<span class="copyright">
|
|
159
|
+
Copyright 2015-Present <a href="https://github.com/Itee">Itee</a> (Tristan Valcke)
|
|
160
|
+
</span>
|
|
161
|
+
|
|
162
|
+
<span class="jsdoc-message">
|
|
163
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a>
|
|
164
|
+
|
|
165
|
+
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
|
166
|
+
</span>
|
|
167
|
+
</footer>
|
|
168
|
+
|
|
169
|
+
<script src="scripts/docstrap.lib.js"></script>
|
|
170
|
+
<script src="scripts/toc.js"></script>
|
|
171
|
+
|
|
172
|
+
<script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
<script>
|
|
176
|
+
$( function () {
|
|
177
|
+
$( "[id*='$']" ).each( function () {
|
|
178
|
+
var $this = $( this );
|
|
179
|
+
|
|
180
|
+
$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
|
|
181
|
+
} );
|
|
182
|
+
|
|
183
|
+
$( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
|
|
184
|
+
var $this = $( this );
|
|
185
|
+
|
|
186
|
+
var example = $this.find( "code" );
|
|
187
|
+
exampleText = example.html();
|
|
188
|
+
var lang = /{@lang (.*?)}/.exec( exampleText );
|
|
189
|
+
if ( lang && lang[1] ) {
|
|
190
|
+
exampleText = exampleText.replace( lang[0], "" );
|
|
191
|
+
example.html( exampleText );
|
|
192
|
+
lang = lang[1];
|
|
193
|
+
} else {
|
|
194
|
+
var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
|
|
195
|
+
lang = langClassMatch ? langClassMatch[1] : "javascript";
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if ( lang ) {
|
|
199
|
+
|
|
200
|
+
$this
|
|
201
|
+
.addClass( "sunlight-highlight-" + lang )
|
|
202
|
+
.addClass( "linenums" )
|
|
203
|
+
.html( example.html() );
|
|
204
|
+
|
|
205
|
+
}
|
|
206
|
+
} );
|
|
207
|
+
|
|
208
|
+
Sunlight.highlightAll( {
|
|
209
|
+
lineNumbers : true,
|
|
210
|
+
showMenu : true,
|
|
211
|
+
enableDoclinks : true
|
|
212
|
+
} );
|
|
213
|
+
|
|
214
|
+
$.catchAnchorLinks( {
|
|
215
|
+
navbarOffset: 10
|
|
216
|
+
} );
|
|
217
|
+
$( "#toc" ).toc( {
|
|
218
|
+
anchorName : function ( i, heading, prefix ) {
|
|
219
|
+
return $( heading ).attr( "id" ) || ( prefix + i );
|
|
220
|
+
},
|
|
221
|
+
selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
|
|
222
|
+
showAndHide : false,
|
|
223
|
+
smoothScrolling: true
|
|
224
|
+
} );
|
|
225
|
+
|
|
226
|
+
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
|
227
|
+
$( '.dropdown-toggle' ).dropdown();
|
|
228
|
+
|
|
229
|
+
$( "table" ).each( function () {
|
|
230
|
+
var $this = $( this );
|
|
231
|
+
$this.addClass('table');
|
|
232
|
+
} );
|
|
233
|
+
|
|
234
|
+
} );
|
|
235
|
+
</script>
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
<!--Navigation and Symbol Display-->
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
<!--Google Analytics-->
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
<script type="text/javascript">
|
|
247
|
+
$(document).ready(function() {
|
|
248
|
+
SearcherDisplay.init();
|
|
249
|
+
});
|
|
250
|
+
</script>
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
</body>
|
|
254
|
+
</html>
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width">
|
|
7
|
+
<title>@itee/tasks v1.2.0 Source: tests/bundlings/check-bundling-from-esm-files-direct.task.mjs</title>
|
|
8
|
+
|
|
9
|
+
<!--[if lt IE 9]>
|
|
10
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
11
|
+
<![endif]-->
|
|
12
|
+
<link type="text/css" rel="stylesheet" href="styles/sunlight.dark.css">
|
|
13
|
+
|
|
14
|
+
<link type="text/css" rel="stylesheet" href="styles/site.cyborg.css">
|
|
15
|
+
|
|
16
|
+
</head>
|
|
17
|
+
|
|
18
|
+
<body>
|
|
19
|
+
|
|
20
|
+
<div class="navbar navbar-default navbar-fixed-top ">
|
|
21
|
+
<div class="container">
|
|
22
|
+
<div class="navbar-header">
|
|
23
|
+
<a class="navbar-brand" href="index.html">@itee/tasks v1.2.0</a>
|
|
24
|
+
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
|
|
25
|
+
<span class="icon-bar"></span>
|
|
26
|
+
<span class="icon-bar"></span>
|
|
27
|
+
<span class="icon-bar"></span>
|
|
28
|
+
</button>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="navbar-collapse collapse" id="topNavigation">
|
|
31
|
+
<ul class="nav navbar-nav">
|
|
32
|
+
|
|
33
|
+
<li class="dropdown">
|
|
34
|
+
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
|
|
35
|
+
<ul class="dropdown-menu inline">
|
|
36
|
+
<li><a href="global.html#checkBundlingFromEsmFilesDirectTask">checkBundlingFromEsmFilesDirectTask</a></li><li><a href="global.html#checkBundlingTask">checkBundlingTask</a></li><li><a href="global.html#computeBenchmarksTask">computeBenchmarksTask</a></li><li><a href="global.html#computeUnitTestsTask">computeUnitTestsTask</a></li><li><a href="global.html#createRollupConfigs">createRollupConfigs</a></li><li><a href="global.html#npmrunclean">npm run clean</a></li><li><a href="global.html#npmrunhelpdefault">npm run help ( default )</a></li><li><a href="global.html#npmrunlint">npm run lint</a></li><li><a href="global.html#npmrunpatch">npm run patch</a></li><li><a href="global.html#npmrunrelease">npm run release</a></li><li><a href="global.html#npmruntest">npm run test</a></li><li><a href="global.html#runBenchmarksForBackendTask">runBenchmarksForBackendTask</a></li><li><a href="global.html#runBenchmarksForFrontendTask">runBenchmarksForFrontendTask</a></li><li><a href="global.html#runUnitTestsForBackendTask">runUnitTestsForBackendTask</a></li><li><a href="global.html#runUnitTestsForFrontendTask">runUnitTestsForFrontendTask</a></li>
|
|
37
|
+
</ul>
|
|
38
|
+
</li>
|
|
39
|
+
|
|
40
|
+
</ul>
|
|
41
|
+
|
|
42
|
+
<div class="col-sm-3 col-md-3">
|
|
43
|
+
<form class="navbar-form" role="search">
|
|
44
|
+
<div class="input-group">
|
|
45
|
+
<input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
|
|
46
|
+
<div class="input-group-btn">
|
|
47
|
+
<button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</form>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<div class="container" id="toc-content">
|
|
60
|
+
<div class="row">
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<div class="col-md-12">
|
|
64
|
+
|
|
65
|
+
<div id="main">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
<h1 class="page-title">Source: tests/bundlings/check-bundling-from-esm-files-direct.task.mjs</h1>
|
|
69
|
+
|
|
70
|
+
<section>
|
|
71
|
+
<article>
|
|
72
|
+
<pre
|
|
73
|
+
class="sunlight-highlight-javascript linenums">import colors from 'ansi-colors'
|
|
74
|
+
import log from 'fancy-log'
|
|
75
|
+
import {
|
|
76
|
+
existsSync,
|
|
77
|
+
rmSync
|
|
78
|
+
} from 'fs'
|
|
79
|
+
import { glob } from 'glob'
|
|
80
|
+
import {
|
|
81
|
+
basename,
|
|
82
|
+
dirname,
|
|
83
|
+
extname,
|
|
84
|
+
join,
|
|
85
|
+
normalize
|
|
86
|
+
} from 'path'
|
|
87
|
+
import { rollup } from 'rollup'
|
|
88
|
+
import {
|
|
89
|
+
getTaskConfigurationFor,
|
|
90
|
+
logLoadingTask,
|
|
91
|
+
packageSourcesDirectory,
|
|
92
|
+
packageTestsBundlesDirectory
|
|
93
|
+
} from '../../_utils.mjs'
|
|
94
|
+
|
|
95
|
+
logLoadingTask( import.meta.filename )
|
|
96
|
+
|
|
97
|
+
const {
|
|
98
|
+
red,
|
|
99
|
+
green,
|
|
100
|
+
magenta,
|
|
101
|
+
} = colors
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @description In view to detect bundling side effects this task will
|
|
105
|
+
* create intermediary file for each individual export from this package
|
|
106
|
+
* and then create rollup config for each of them and bundle
|
|
107
|
+
* Todo: Check for different target env like next task below this one
|
|
108
|
+
*/
|
|
109
|
+
const checkBundlingFromEsmFilesDirectTask = async ( done ) => {
|
|
110
|
+
|
|
111
|
+
const outputDir = join( packageTestsBundlesDirectory, 'from_files_direct' )
|
|
112
|
+
if ( existsSync( outputDir ) ) {
|
|
113
|
+
log( 'Clean up', magenta( outputDir ) )
|
|
114
|
+
rmSync( outputDir, { recursive: true } )
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const configuration = await getTaskConfigurationFor( import.meta.filename )
|
|
118
|
+
|
|
119
|
+
// Get source files to process
|
|
120
|
+
const pattern = join( packageSourcesDirectory, '**' )
|
|
121
|
+
const sourceFiles = glob.sync( pattern )
|
|
122
|
+
.map( filePath => normalize( filePath ) )
|
|
123
|
+
.filter( filePath => {
|
|
124
|
+
const fileName = basename( filePath )
|
|
125
|
+
const isJsFile = fileName.endsWith( '.js' )
|
|
126
|
+
const isNotPrivateFile = !fileName.startsWith( '_' )
|
|
127
|
+
const isNotIgnoredFile = !configuration.ignoredFiles.includes( fileName )
|
|
128
|
+
return isJsFile && isNotPrivateFile && isNotIgnoredFile
|
|
129
|
+
} )
|
|
130
|
+
|
|
131
|
+
for ( let sourceFile of sourceFiles ) {
|
|
132
|
+
|
|
133
|
+
const specificFilePath = sourceFile.replace( packageSourcesDirectory, '' )
|
|
134
|
+
const specificDir = dirname( specificFilePath )
|
|
135
|
+
const fileName = basename( sourceFile, extname( sourceFile ) )
|
|
136
|
+
|
|
137
|
+
const bundleFileName = `${ fileName }.bundle.js`
|
|
138
|
+
const bundleFilePath = join( outputDir, specificDir, bundleFileName )
|
|
139
|
+
|
|
140
|
+
configuration.buildOptions.input = sourceFile
|
|
141
|
+
configuration.buildOptions.output.file = bundleFilePath
|
|
142
|
+
|
|
143
|
+
try {
|
|
144
|
+
|
|
145
|
+
log( 'Bundling', green( configuration.buildOptions.output.file ) )
|
|
146
|
+
|
|
147
|
+
const bundle = await rollup( configuration.buildOptions )
|
|
148
|
+
await bundle.generate( configuration.buildOptions.output )
|
|
149
|
+
await bundle.write( configuration.buildOptions.output )
|
|
150
|
+
|
|
151
|
+
} catch ( error ) {
|
|
152
|
+
|
|
153
|
+
log( red( error.message ) )
|
|
154
|
+
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
done()
|
|
160
|
+
|
|
161
|
+
}
|
|
162
|
+
checkBundlingFromEsmFilesDirectTask.displayName = basename( import.meta.filename, '.task.mjs' )
|
|
163
|
+
checkBundlingFromEsmFilesDirectTask.description = 'In view to detect bundling side effects this task will create intermediary file for each individual export from this package and then create rollup config for each of them and bundle'
|
|
164
|
+
checkBundlingFromEsmFilesDirectTask.flags = null
|
|
165
|
+
|
|
166
|
+
export { checkBundlingFromEsmFilesDirectTask }</pre>
|
|
167
|
+
</article>
|
|
168
|
+
</section>
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<div class="clearfix"></div>
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
<div class="modal fade" id="searchResults">
|
|
186
|
+
<div class="modal-dialog">
|
|
187
|
+
<div class="modal-content">
|
|
188
|
+
<div class="modal-header">
|
|
189
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
190
|
+
<h4 class="modal-title">Search results</h4>
|
|
191
|
+
</div>
|
|
192
|
+
<div class="modal-body"></div>
|
|
193
|
+
<div class="modal-footer">
|
|
194
|
+
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
195
|
+
</div>
|
|
196
|
+
</div><!-- /.modal-content -->
|
|
197
|
+
</div><!-- /.modal-dialog -->
|
|
198
|
+
</div>
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
<footer>
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
<span class="copyright">
|
|
205
|
+
Copyright 2015-Present <a href="https://github.com/Itee">Itee</a> (Tristan Valcke)
|
|
206
|
+
</span>
|
|
207
|
+
|
|
208
|
+
<span class="jsdoc-message">
|
|
209
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a>
|
|
210
|
+
|
|
211
|
+
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
|
212
|
+
</span>
|
|
213
|
+
</footer>
|
|
214
|
+
|
|
215
|
+
<script src="scripts/docstrap.lib.js"></script>
|
|
216
|
+
<script src="scripts/toc.js"></script>
|
|
217
|
+
|
|
218
|
+
<script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
<script>
|
|
222
|
+
$( function () {
|
|
223
|
+
$( "[id*='$']" ).each( function () {
|
|
224
|
+
var $this = $( this );
|
|
225
|
+
|
|
226
|
+
$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
|
|
227
|
+
} );
|
|
228
|
+
|
|
229
|
+
$( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
|
|
230
|
+
var $this = $( this );
|
|
231
|
+
|
|
232
|
+
var example = $this.find( "code" );
|
|
233
|
+
exampleText = example.html();
|
|
234
|
+
var lang = /{@lang (.*?)}/.exec( exampleText );
|
|
235
|
+
if ( lang && lang[1] ) {
|
|
236
|
+
exampleText = exampleText.replace( lang[0], "" );
|
|
237
|
+
example.html( exampleText );
|
|
238
|
+
lang = lang[1];
|
|
239
|
+
} else {
|
|
240
|
+
var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
|
|
241
|
+
lang = langClassMatch ? langClassMatch[1] : "javascript";
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
if ( lang ) {
|
|
245
|
+
|
|
246
|
+
$this
|
|
247
|
+
.addClass( "sunlight-highlight-" + lang )
|
|
248
|
+
.addClass( "linenums" )
|
|
249
|
+
.html( example.html() );
|
|
250
|
+
|
|
251
|
+
}
|
|
252
|
+
} );
|
|
253
|
+
|
|
254
|
+
Sunlight.highlightAll( {
|
|
255
|
+
lineNumbers : true,
|
|
256
|
+
showMenu : true,
|
|
257
|
+
enableDoclinks : true
|
|
258
|
+
} );
|
|
259
|
+
|
|
260
|
+
$.catchAnchorLinks( {
|
|
261
|
+
navbarOffset: 10
|
|
262
|
+
} );
|
|
263
|
+
$( "#toc" ).toc( {
|
|
264
|
+
anchorName : function ( i, heading, prefix ) {
|
|
265
|
+
return $( heading ).attr( "id" ) || ( prefix + i );
|
|
266
|
+
},
|
|
267
|
+
selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
|
|
268
|
+
showAndHide : false,
|
|
269
|
+
smoothScrolling: true
|
|
270
|
+
} );
|
|
271
|
+
|
|
272
|
+
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
|
273
|
+
$( '.dropdown-toggle' ).dropdown();
|
|
274
|
+
|
|
275
|
+
$( "table" ).each( function () {
|
|
276
|
+
var $this = $( this );
|
|
277
|
+
$this.addClass('table');
|
|
278
|
+
} );
|
|
279
|
+
|
|
280
|
+
} );
|
|
281
|
+
</script>
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
<!--Navigation and Symbol Display-->
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
<!--Google Analytics-->
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
<script type="text/javascript">
|
|
293
|
+
$(document).ready(function() {
|
|
294
|
+
SearcherDisplay.init();
|
|
295
|
+
});
|
|
296
|
+
</script>
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
</body>
|
|
300
|
+
</html>
|