1 | <!DOCTYPE html>
|
2 | <html lang="en">
|
3 | <head>
|
4 | <meta charset="utf-8">
|
5 | <title>JSDoc: Global</title>
|
6 |
|
7 | <script src="scripts/prettify/prettify.js"> </script>
|
8 | <script src="scripts/prettify/lang-css.js"> </script>
|
9 | |
10 |
|
11 |
|
12 | <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
13 | <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
14 | </head>
|
15 |
|
16 | <body>
|
17 |
|
18 | <div id="main">
|
19 |
|
20 | <h1 class="page-title">Global</h1>
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | <section>
|
28 |
|
29 | <header>
|
30 |
|
31 | <h2></h2>
|
32 |
|
33 |
|
34 | </header>
|
35 |
|
36 | <article>
|
37 | <div class="container-overview">
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 | <dl class="details">
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 | </dl>
|
78 |
|
79 |
|
80 |
|
81 |
|
82 | </div>
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 | <h3 class="subsection-title">Methods</h3>
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 |
|
107 | <h4 class="name" id="mosaic"><span class="type-signature"></span>mosaic<span class="signature">(config)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 | <h5>Parameters:</h5>
|
123 |
|
124 |
|
125 | <table class="params">
|
126 | <thead>
|
127 | <tr>
|
128 |
|
129 | <th>Name</th>
|
130 |
|
131 |
|
132 | <th>Type</th>
|
133 |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 | <th class="last">Description</th>
|
139 | </tr>
|
140 | </thead>
|
141 |
|
142 | <tbody>
|
143 |
|
144 |
|
145 | <tr>
|
146 |
|
147 | <td class="name"><code>config</code></td>
|
148 |
|
149 |
|
150 | <td class="type">
|
151 |
|
152 |
|
153 | <span class="param-type"><a href="global.html#Config">Config</a></span>
|
154 |
|
155 |
|
156 |
|
157 | </td>
|
158 |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 | <td class="description last"></td>
|
164 | </tr>
|
165 |
|
166 |
|
167 | </tbody>
|
168 | </table>
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 |
|
175 | <dl class="details">
|
176 |
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 |
|
183 |
|
184 |
|
185 |
|
186 |
|
187 |
|
188 |
|
189 |
|
190 |
|
191 |
|
192 |
|
193 |
|
194 |
|
195 |
|
196 |
|
197 |
|
198 |
|
199 |
|
200 |
|
201 |
|
202 | <dt class="tag-source">Source:</dt>
|
203 | <dd class="tag-source"><ul class="dummy"><li>
|
204 | <a href="index.js.html">index.js</a>, <a href="index.js.html#line60">line 60</a>
|
205 | </li></ul></dd>
|
206 |
|
207 |
|
208 |
|
209 |
|
210 |
|
211 |
|
212 |
|
213 | </dl>
|
214 |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 |
|
220 |
|
221 |
|
222 |
|
223 |
|
224 |
|
225 |
|
226 |
|
227 |
|
228 |
|
229 | <h5>Returns:</h5>
|
230 |
|
231 |
|
232 |
|
233 |
|
234 | <dl>
|
235 | <dt>
|
236 | Type
|
237 | </dt>
|
238 | <dd>
|
239 |
|
240 | <span class="param-type">Promise.<void></span>
|
241 |
|
242 |
|
243 | </dd>
|
244 | </dl>
|
245 |
|
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 |
|
256 | <h3 class="subsection-title">Type Definitions</h3>
|
257 |
|
258 |
|
259 |
|
260 | <h4 class="name" id="Config">Config</h4>
|
261 |
|
262 |
|
263 |
|
264 |
|
265 | <div class="description">
|
266 | Mosaic configuration
|
267 | </div>
|
268 |
|
269 |
|
270 |
|
271 | <h5>Type:</h5>
|
272 | <ul>
|
273 | <li>
|
274 |
|
275 | <span class="param-type">Object</span>
|
276 |
|
277 |
|
278 | </li>
|
279 | </ul>
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 | <h5 class="subsection-title">Properties:</h5>
|
286 |
|
287 |
|
288 |
|
289 | <table class="props">
|
290 | <thead>
|
291 | <tr>
|
292 |
|
293 | <th>Name</th>
|
294 |
|
295 |
|
296 | <th>Type</th>
|
297 |
|
298 |
|
299 | <th>Attributes</th>
|
300 |
|
301 |
|
302 |
|
303 |
|
304 | <th class="last">Description</th>
|
305 | </tr>
|
306 | </thead>
|
307 |
|
308 | <tbody>
|
309 |
|
310 |
|
311 | <tr>
|
312 |
|
313 | <td class="name"><code>input</code></td>
|
314 |
|
315 |
|
316 | <td class="type">
|
317 |
|
318 |
|
319 | <span class="param-type">Object.<string, string></span>
|
320 |
|
321 |
|
322 |
|
323 | </td>
|
324 |
|
325 |
|
326 | <td class="attributes">
|
327 |
|
328 |
|
329 |
|
330 | </td>
|
331 |
|
332 |
|
333 |
|
334 |
|
335 | <td class="description last">a dictionary of key value pairs where key is the name of a set of files and value is a glob pattern describing the location of those files on disk</td>
|
336 | </tr>
|
337 |
|
338 |
|
339 |
|
340 | <tr>
|
341 |
|
342 | <td class="name"><code>transform</code></td>
|
343 |
|
344 |
|
345 | <td class="type">
|
346 |
|
347 |
|
348 | <span class="param-type">Array.<function()></span>
|
349 |
|
350 |
|
351 |
|
352 | </td>
|
353 |
|
354 |
|
355 | <td class="attributes">
|
356 |
|
357 |
|
358 |
|
359 | </td>
|
360 |
|
361 |
|
362 |
|
363 |
|
364 | <td class="description last">an array of functions to be called in series in order to transform the input</td>
|
365 | </tr>
|
366 |
|
367 |
|
368 |
|
369 | <tr>
|
370 |
|
371 | <td class="name"><code>output</code></td>
|
372 |
|
373 |
|
374 | <td class="type">
|
375 |
|
376 |
|
377 | <span class="param-type"><a href="global.html#OutputMapFn">OutputMapFn</a></span>
|
378 |
|
379 |
|
380 |
|
381 | </td>
|
382 |
|
383 |
|
384 | <td class="attributes">
|
385 |
|
386 |
|
387 |
|
388 | </td>
|
389 |
|
390 |
|
391 |
|
392 |
|
393 | <td class="description last">a function that takes the output of the transform pipeline and then returns an FileObject array representing the files to be saved to disk</td>
|
394 | </tr>
|
395 |
|
396 |
|
397 |
|
398 | <tr>
|
399 |
|
400 | <td class="name"><code>serve</code></td>
|
401 |
|
402 |
|
403 | <td class="type">
|
404 |
|
405 |
|
406 | <span class="param-type"><a href="global.html#Server">Server</a></span>
|
407 |
|
408 |
|
409 |
|
410 | </td>
|
411 |
|
412 |
|
413 | <td class="attributes">
|
414 |
|
415 | <optional><br>
|
416 |
|
417 |
|
418 |
|
419 | </td>
|
420 |
|
421 |
|
422 |
|
423 |
|
424 | <td class="description last">optionally serve files using an express server</td>
|
425 | </tr>
|
426 |
|
427 |
|
428 | </tbody>
|
429 | </table>
|
430 |
|
431 |
|
432 |
|
433 |
|
434 | <dl class="details">
|
435 |
|
436 |
|
437 |
|
438 |
|
439 |
|
440 |
|
441 |
|
442 |
|
443 |
|
444 |
|
445 |
|
446 |
|
447 |
|
448 |
|
449 |
|
450 |
|
451 |
|
452 |
|
453 |
|
454 |
|
455 |
|
456 |
|
457 |
|
458 |
|
459 |
|
460 |
|
461 | <dt class="tag-source">Source:</dt>
|
462 | <dd class="tag-source"><ul class="dummy"><li>
|
463 | <a href="index.js.html">index.js</a>, <a href="index.js.html#line43">line 43</a>
|
464 | </li></ul></dd>
|
465 |
|
466 |
|
467 |
|
468 |
|
469 |
|
470 |
|
471 |
|
472 | </dl>
|
473 |
|
474 |
|
475 |
|
476 |
|
477 |
|
478 |
|
479 |
|
480 |
|
481 | <h4 class="name" id="FileObject">FileObject</h4>
|
482 |
|
483 |
|
484 |
|
485 |
|
486 |
|
487 |
|
488 | <h5>Type:</h5>
|
489 | <ul>
|
490 | <li>
|
491 |
|
492 | <span class="param-type">object</span>
|
493 |
|
494 |
|
495 | </li>
|
496 | </ul>
|
497 |
|
498 |
|
499 |
|
500 |
|
501 |
|
502 | <h5 class="subsection-title">Properties:</h5>
|
503 |
|
504 |
|
505 |
|
506 | <table class="props">
|
507 | <thead>
|
508 | <tr>
|
509 |
|
510 | <th>Name</th>
|
511 |
|
512 |
|
513 | <th>Type</th>
|
514 |
|
515 |
|
516 |
|
517 |
|
518 |
|
519 | <th class="last">Description</th>
|
520 | </tr>
|
521 | </thead>
|
522 |
|
523 | <tbody>
|
524 |
|
525 |
|
526 | <tr>
|
527 |
|
528 | <td class="name"><code>filepath</code></td>
|
529 |
|
530 |
|
531 | <td class="type">
|
532 |
|
533 |
|
534 | <span class="param-type">string</span>
|
535 |
|
536 |
|
537 |
|
538 | </td>
|
539 |
|
540 |
|
541 |
|
542 |
|
543 |
|
544 | <td class="description last">the location of the file on disk</td>
|
545 | </tr>
|
546 |
|
547 |
|
548 |
|
549 | <tr>
|
550 |
|
551 | <td class="name"><code>content</code></td>
|
552 |
|
553 |
|
554 | <td class="type">
|
555 |
|
556 |
|
557 | <span class="param-type">string</span>
|
558 |
|
559 |
|
560 |
|
561 | </td>
|
562 |
|
563 |
|
564 |
|
565 |
|
566 |
|
567 | <td class="description last">the file content</td>
|
568 | </tr>
|
569 |
|
570 |
|
571 | </tbody>
|
572 | </table>
|
573 |
|
574 |
|
575 |
|
576 |
|
577 | <dl class="details">
|
578 |
|
579 |
|
580 |
|
581 |
|
582 |
|
583 |
|
584 |
|
585 |
|
586 |
|
587 |
|
588 |
|
589 |
|
590 |
|
591 |
|
592 |
|
593 |
|
594 |
|
595 |
|
596 |
|
597 |
|
598 |
|
599 |
|
600 |
|
601 |
|
602 |
|
603 |
|
604 | <dt class="tag-source">Source:</dt>
|
605 | <dd class="tag-source"><ul class="dummy"><li>
|
606 | <a href="index.js.html">index.js</a>, <a href="index.js.html#line22">line 22</a>
|
607 | </li></ul></dd>
|
608 |
|
609 |
|
610 |
|
611 |
|
612 |
|
613 |
|
614 |
|
615 | </dl>
|
616 |
|
617 |
|
618 |
|
619 |
|
620 |
|
621 |
|
622 |
|
623 |
|
624 | <h4 class="name" id="OutputMapFn">OutputMapFn</h4>
|
625 |
|
626 |
|
627 |
|
628 |
|
629 |
|
630 |
|
631 |
|
632 |
|
633 |
|
634 |
|
635 | <dl class="details">
|
636 |
|
637 |
|
638 |
|
639 |
|
640 |
|
641 |
|
642 |
|
643 |
|
644 |
|
645 |
|
646 |
|
647 |
|
648 |
|
649 |
|
650 |
|
651 |
|
652 |
|
653 |
|
654 |
|
655 |
|
656 |
|
657 |
|
658 |
|
659 |
|
660 |
|
661 |
|
662 | <dt class="tag-source">Source:</dt>
|
663 | <dd class="tag-source"><ul class="dummy"><li>
|
664 | <a href="index.js.html">index.js</a>, <a href="index.js.html#line37">line 37</a>
|
665 | </li></ul></dd>
|
666 |
|
667 |
|
668 |
|
669 |
|
670 |
|
671 |
|
672 |
|
673 | </dl>
|
674 |
|
675 |
|
676 |
|
677 |
|
678 |
|
679 |
|
680 |
|
681 |
|
682 | <h4 class="name" id="Server">Server</h4>
|
683 |
|
684 |
|
685 |
|
686 |
|
687 |
|
688 |
|
689 | <h5>Type:</h5>
|
690 | <ul>
|
691 | <li>
|
692 |
|
693 | <span class="param-type">object</span>
|
694 |
|
695 |
|
696 | </li>
|
697 | </ul>
|
698 |
|
699 |
|
700 |
|
701 |
|
702 |
|
703 | <h5 class="subsection-title">Properties:</h5>
|
704 |
|
705 |
|
706 |
|
707 | <table class="props">
|
708 | <thead>
|
709 | <tr>
|
710 |
|
711 | <th>Name</th>
|
712 |
|
713 |
|
714 | <th>Type</th>
|
715 |
|
716 |
|
717 | <th>Attributes</th>
|
718 |
|
719 |
|
720 |
|
721 | <th>Default</th>
|
722 |
|
723 |
|
724 | <th class="last">Description</th>
|
725 | </tr>
|
726 | </thead>
|
727 |
|
728 | <tbody>
|
729 |
|
730 |
|
731 | <tr>
|
732 |
|
733 | <td class="name"><code>port</code></td>
|
734 |
|
735 |
|
736 | <td class="type">
|
737 |
|
738 |
|
739 | <span class="param-type">string</span>
|
740 |
|
741 |
|
742 |
|
743 | </td>
|
744 |
|
745 |
|
746 | <td class="attributes">
|
747 |
|
748 | <optional><br>
|
749 |
|
750 |
|
751 |
|
752 | </td>
|
753 |
|
754 |
|
755 |
|
756 | <td class="default">
|
757 |
|
758 | 3000
|
759 |
|
760 | </td>
|
761 |
|
762 |
|
763 | <td class="description last">the port to serve on</td>
|
764 | </tr>
|
765 |
|
766 |
|
767 |
|
768 | <tr>
|
769 |
|
770 | <td class="name"><code>staticPath</code></td>
|
771 |
|
772 |
|
773 | <td class="type">
|
774 |
|
775 |
|
776 | <span class="param-type">string</span>
|
777 |
|
778 |
|
779 |
|
780 | </td>
|
781 |
|
782 |
|
783 | <td class="attributes">
|
784 |
|
785 | <optional><br>
|
786 |
|
787 |
|
788 |
|
789 | </td>
|
790 |
|
791 |
|
792 |
|
793 | <td class="default">
|
794 |
|
795 | </td>
|
796 |
|
797 |
|
798 | <td class="description last">An optional static path</td>
|
799 | </tr>
|
800 |
|
801 |
|
802 |
|
803 | <tr>
|
804 |
|
805 | <td class="name"><code>routes</code></td>
|
806 |
|
807 |
|
808 | <td class="type">
|
809 |
|
810 |
|
811 | <span class="param-type">Object.<string, string></span>
|
812 |
|
813 |
|
814 |
|
815 | </td>
|
816 |
|
817 |
|
818 | <td class="attributes">
|
819 |
|
820 |
|
821 |
|
822 | </td>
|
823 |
|
824 |
|
825 |
|
826 | <td class="default">
|
827 |
|
828 | </td>
|
829 |
|
830 |
|
831 | <td class="description last">A dictionary of key value pairs, where each key is the name of a route path, and the value is the string content that should be served for that route</td>
|
832 | </tr>
|
833 |
|
834 |
|
835 | </tbody>
|
836 | </table>
|
837 |
|
838 |
|
839 |
|
840 |
|
841 | <dl class="details">
|
842 |
|
843 |
|
844 |
|
845 |
|
846 |
|
847 |
|
848 |
|
849 |
|
850 |
|
851 |
|
852 |
|
853 |
|
854 |
|
855 |
|
856 |
|
857 |
|
858 |
|
859 |
|
860 |
|
861 |
|
862 |
|
863 |
|
864 |
|
865 |
|
866 |
|
867 |
|
868 | <dt class="tag-source">Source:</dt>
|
869 | <dd class="tag-source"><ul class="dummy"><li>
|
870 | <a href="index.js.html">index.js</a>, <a href="index.js.html#line28">line 28</a>
|
871 | </li></ul></dd>
|
872 |
|
873 |
|
874 |
|
875 |
|
876 |
|
877 |
|
878 |
|
879 | </dl>
|
880 |
|
881 |
|
882 |
|
883 |
|
884 |
|
885 |
|
886 |
|
887 |
|
888 |
|
889 |
|
890 | </article>
|
891 |
|
892 | </section>
|
893 |
|
894 |
|
895 |
|
896 |
|
897 | </div>
|
898 |
|
899 | <nav>
|
900 | <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#mosaic">mosaic</a></li></ul>
|
901 | </nav>
|
902 |
|
903 | <br class="clear">
|
904 |
|
905 | <footer>
|
906 | Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Tue Feb 02 2021 21:18:41 GMT+0000 (Greenwich Mean Time)
|
907 | </footer>
|
908 |
|
909 | <script> prettyPrint(); </script>
|
910 | <script src="scripts/linenumber.js"> </script>
|
911 | </body>
|
912 | </html> |
\ | No newline at end of file |