web-documentation 1.0.0
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/build/deploy.js +71 -0
- package/package.json +336 -0
- package/readme.md +37 -0
- package/source/deploy.ts +721 -0
- package/source/dummyDistributionBundle.zip +0 -0
- package/source/dummyReadme.md +266 -0
- package/source/image/arrowDown.png +0 -0
- package/source/image/blacktocat.png +0 -0
- package/source/image/favicon.png +0 -0
- package/source/image/folderBlue.png +0 -0
- package/source/image/folderGray.png +0 -0
- package/source/index.css +492 -0
- package/source/index.html.ejs +303 -0
- package/source/index.ts +431 -0
- package/source/renderMarkdown.mjs +31 -0
- package/source/test.ts +35 -0
- package/source/type.ts +39 -0
|
Binary file
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
<!-- !/usr/bin/env markdown
|
|
2
|
+
-*- coding: utf-8 -*-
|
|
3
|
+
region header
|
|
4
|
+
Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
|
|
5
|
+
|
|
6
|
+
License
|
|
7
|
+
-------
|
|
8
|
+
|
|
9
|
+
This library written by Torben Sickert stand under a creative commons naming
|
|
10
|
+
3.0 unported license. See https://creativecommons.org/licenses/by/3.0/deed.de
|
|
11
|
+
endregion -->
|
|
12
|
+
|
|
13
|
+
Project status
|
|
14
|
+
--------------
|
|
15
|
+
|
|
16
|
+
[](https://www.npmjs.com/package/clientnode)
|
|
17
|
+
[](https://www.npmjs.com/package/clientnode)
|
|
18
|
+
|
|
19
|
+
[](https://github.com/thaibault/clientnode/actions/workflows/build.yaml)
|
|
20
|
+
|
|
21
|
+
[](https://github.com/thaibault/clientnode/actions/workflows/check-types.yaml)
|
|
22
|
+
[](https://github.com/thaibault/clientnode/actions/workflows/lint.yaml)
|
|
23
|
+
[](https://github.com/thaibault/clientnode/actions/workflows/test-coverage-report.yaml)
|
|
24
|
+
|
|
25
|
+
[](https://coveralls.io/github/thaibault/clientnode)
|
|
26
|
+
|
|
27
|
+
[](https://torben.website/clientnode)
|
|
28
|
+
|
|
29
|
+
[](https://npm.runkit.com/clientnode)
|
|
30
|
+
|
|
31
|
+
<!--|deDE:Einsatz-->
|
|
32
|
+
Use case
|
|
33
|
+
--------
|
|
34
|
+
|
|
35
|
+
The main goal of This plugin is providing an generic interface logic like
|
|
36
|
+
controller for calling instance methods or getting property values of an object
|
|
37
|
+
orientated designed plugin. A set of reusable logic elements for building gui
|
|
38
|
+
components is integrated as well.
|
|
39
|
+
<!--deDE:
|
|
40
|
+
Hauptziel dieses Plugins ist es einen generischen Weg zu bieten indem
|
|
41
|
+
Objekt Orientierte Plugins verfasst werden können, ohne dabei gegen
|
|
42
|
+
jQuery's Vorgaben an Plugins zu verstoßen.
|
|
43
|
+
Desweiteren werden einige wiederverwendbare Logikbausteine zum Bau
|
|
44
|
+
verschiedener GUI-Komponenten mitgeliefert.
|
|
45
|
+
-->
|
|
46
|
+
|
|
47
|
+
<!--Place for automatic generated table of contents.-->
|
|
48
|
+
<div class="doc-toc" style="display:none">
|
|
49
|
+
<!--|deDE:Inhalt-->
|
|
50
|
+
<h2 id="content">Content</h2>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<!--|deDE:Merkmale-->
|
|
54
|
+
Features
|
|
55
|
+
--------
|
|
56
|
+
|
|
57
|
+
<ul>
|
|
58
|
+
<li>
|
|
59
|
+
Mutual exclusion support through locking management
|
|
60
|
+
<!--deDE:Wechselseitiger Ausschluss durch Lock-Management-->
|
|
61
|
+
</li>
|
|
62
|
+
<li>
|
|
63
|
+
Cross browser logging with different log levels
|
|
64
|
+
<!--deDE:
|
|
65
|
+
Browserübergreifender Log-Mechanismen mit diversen Log-Levels
|
|
66
|
+
-->
|
|
67
|
+
</li>
|
|
68
|
+
<li>
|
|
69
|
+
Extending native JavaScript types like strings, arrays or functions
|
|
70
|
+
<!--deDE:
|
|
71
|
+
Erweiterung der Standard-JavaScript-Typen wie Strings, Arrays und
|
|
72
|
+
Funktionen
|
|
73
|
+
-->
|
|
74
|
+
</li>
|
|
75
|
+
<li>
|
|
76
|
+
A set of helper functions to parse option objects
|
|
77
|
+
<!--deDE:Hilfsfunktionen um Options-Objekte intelligent zu parsen-->
|
|
78
|
+
</li>
|
|
79
|
+
<li>
|
|
80
|
+
Extended dom tree handling.<!--deDE:Erweitertes DOM-Baum-Management-->
|
|
81
|
+
</li>
|
|
82
|
+
<li>
|
|
83
|
+
Plugin scoped event handling.
|
|
84
|
+
<!--deDE:Plugineigene Namensräume für Events.-->
|
|
85
|
+
</li>
|
|
86
|
+
<li>
|
|
87
|
+
Generic none-redundant plugin pattern for JavaScript and CoffeeScript
|
|
88
|
+
<!--deDE:Generischer Plugin-Muster für JavaScript und CoffeeScript-->
|
|
89
|
+
</li>
|
|
90
|
+
</ul>
|
|
91
|
+
|
|
92
|
+
<!--|deDE:Installation-->
|
|
93
|
+
Installation
|
|
94
|
+
------------
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
>>> curl \
|
|
98
|
+
https://raw.githubusercontent.com/thaibault/archinstall/main/archinstall.sh >archinstall.sh && \
|
|
99
|
+
chmod +x archinstall.sh
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Executable code example
|
|
103
|
+
|
|
104
|
+
<!--showExample-->
|
|
105
|
+
|
|
106
|
+
```HTML
|
|
107
|
+
<label>
|
|
108
|
+
Name:
|
|
109
|
+
<input type="text" placeholder="Max Musterman" />
|
|
110
|
+
</label>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
<!--|deDE:Klassische Dom-Integration-->
|
|
114
|
+
### Classical dom injection
|
|
115
|
+
|
|
116
|
+
You can simply download the compiled version as zip file here and inject it
|
|
117
|
+
after needed dependencies:
|
|
118
|
+
<!--deDE:
|
|
119
|
+
Du kannst einfach das Plugin als Zip-Archiv herunterladen und per
|
|
120
|
+
Script-Tag in deine Webseite integrieren:
|
|
121
|
+
-->
|
|
122
|
+
|
|
123
|
+
```HTML
|
|
124
|
+
<script
|
|
125
|
+
src="https://code.jquery.com/jquery-3.6.0.min.js"
|
|
126
|
+
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
|
|
127
|
+
crossorigin="anonymous"
|
|
128
|
+
></script>
|
|
129
|
+
<!--Inject downloaded file:
|
|
130
|
+
<script src="index.js"></script>
|
|
131
|
+
-->
|
|
132
|
+
<!--Or integrate via cdn:-->
|
|
133
|
+
<script
|
|
134
|
+
src="https://torben.website/clientnode/data/distributionBundle/index.js"
|
|
135
|
+
></script>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The compiled bundle supports AMD, commonjs, commonjs2 and variable injection
|
|
139
|
+
into given context (UMD) as export format: You can use a module bundler if you
|
|
140
|
+
want.
|
|
141
|
+
<!--deDE:
|
|
142
|
+
Das kompilierte Bundle unterstützt AMD, commonjs, commonjs2 und
|
|
143
|
+
Variable-Injection in den gegebenen Context (UMD) als Export-Format:
|
|
144
|
+
Dadurch können verschiedene Module-Bundler genutzt werden.
|
|
145
|
+
-->
|
|
146
|
+
|
|
147
|
+
<!--|deDE:Paket-Management und Modul-Komposition-->
|
|
148
|
+
### Package managed and module bundled
|
|
149
|
+
|
|
150
|
+
If you are using npm as package manager you can simply add this tool to your
|
|
151
|
+
**package.json** as dependency:
|
|
152
|
+
<!--deDE:
|
|
153
|
+
Nutzt du npm als Paket-Manager, dann solltest du einfach deine
|
|
154
|
+
<strong>package.json</strong> erweitern:
|
|
155
|
+
-->
|
|
156
|
+
|
|
157
|
+
```JSON
|
|
158
|
+
...
|
|
159
|
+
"dependencies": {
|
|
160
|
+
...
|
|
161
|
+
"clientnode": "latest",
|
|
162
|
+
...
|
|
163
|
+
},
|
|
164
|
+
...
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
After updating your packages you can simply depend on this script and let
|
|
168
|
+
a module bundler do the hard stuff or access it via an exported variable name
|
|
169
|
+
in given context.
|
|
170
|
+
<!--deDE:
|
|
171
|
+
Nach einem Update deiner Pakete kannst du dieses Plugin einfach in deine
|
|
172
|
+
JavaScript-Module importieren oder die exportierte Variable im gegebenen
|
|
173
|
+
Context referenzieren.
|
|
174
|
+
-->
|
|
175
|
+
|
|
176
|
+
```JavaScript
|
|
177
|
+
...
|
|
178
|
+
import Tools from 'clientnode'
|
|
179
|
+
clas Plugin extends Tools...
|
|
180
|
+
Tools({logging: true}).log('test') // shows "test" in console
|
|
181
|
+
// or
|
|
182
|
+
import {$} from 'clientnode'
|
|
183
|
+
$.Tools().isEquivalentDom('<div>', '<script>') // false
|
|
184
|
+
// or
|
|
185
|
+
{makeArray} = require('clientnode').default
|
|
186
|
+
makeArray(2) // [2]
|
|
187
|
+
// or
|
|
188
|
+
$ = require('clientnode').$
|
|
189
|
+
$.Tools().isEquivalentDom('<div>', '<script>') // false
|
|
190
|
+
...
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
<!--|deDE:Plugin-Vorlage-->
|
|
194
|
+
Plugin pattern
|
|
195
|
+
--------------
|
|
196
|
+
|
|
197
|
+
Use as extension for object orientated, node and browser compatible (optionally
|
|
198
|
+
jQuery) plugin using inheritance and dom node as return value reference. This
|
|
199
|
+
plugin pattern gives their instance back if no dom node is provided. Direct
|
|
200
|
+
initializing the plugin without providing a dom node is also provided.
|
|
201
|
+
Note: if you want to use it as jQuery (or another or even custom) plugin you
|
|
202
|
+
have to provide "$" globally before loading this module.
|
|
203
|
+
<!--deDE:
|
|
204
|
+
Einsatz von "$.Tools" um Objekt orientierte, node und Browser kompatible
|
|
205
|
+
(optional jQuery) Plugins zu implementieren, indem von "$.Tools" geerbt
|
|
206
|
+
wird und der durch jQuery erweiterte DOM-Knoten als return-Wert
|
|
207
|
+
referenziert wird. Sollte kein DOM-Knoten an die $-Funktion übergeben
|
|
208
|
+
worden sein, gibt dieser Pattern seine Instanz zurück.
|
|
209
|
+
Beachte: Wenn das Modul als jQuery (oder anderem potentiell eigenen) Plugin
|
|
210
|
+
einer bereits bestehenden Instanz hinzugefügt werden soll muss dieses unter
|
|
211
|
+
"$" global verfügbar sein bevor das Modul geladen wird.
|
|
212
|
+
-->
|
|
213
|
+
|
|
214
|
+
```JavaScript
|
|
215
|
+
'use strict'
|
|
216
|
+
import {$} from 'clientnode'
|
|
217
|
+
/**
|
|
218
|
+
* This plugin holds all needed methods to extend input fields to select
|
|
219
|
+
* numbers very smart.
|
|
220
|
+
* @extends clientnode:Tools
|
|
221
|
+
* @property static:_name - Defines this class name to allow retrieving them
|
|
222
|
+
* after name mangling.
|
|
223
|
+
* @property _options - Options extended by the options given to the
|
|
224
|
+
* initializer method.
|
|
225
|
+
*/
|
|
226
|
+
export default class Example extends $.Tools.class {
|
|
227
|
+
static _name = 'Example';
|
|
228
|
+
/* eslint-disable jsdoc/require-description-complete-sentence */
|
|
229
|
+
/**
|
|
230
|
+
* Initializes the plugin. Later needed dom nodes are grabbed.
|
|
231
|
+
* @param options - An options object.
|
|
232
|
+
* @returns Returns $'s extended current dom node.
|
|
233
|
+
*/
|
|
234
|
+
initialize(options = {}) {
|
|
235
|
+
/* eslint-enable jsdoc/require-description-complete-sentence */
|
|
236
|
+
this._options = {/*Default options here*/}
|
|
237
|
+
super.initialize(options)
|
|
238
|
+
return this.$domNode
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
$.fn.Example = function() {
|
|
242
|
+
return $.Tools().controller(Example, arguments, this)
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Initialisation with given dom node and without:
|
|
247
|
+
<!--deDE:Aufruf mit und ohne übergebenen DOM-Knoten:-->
|
|
248
|
+
|
|
249
|
+
```JavaScript
|
|
250
|
+
const $domNode = $('#domNode').Example({firstOption: 'value'});
|
|
251
|
+
const exampleInstance = $.Example({firstOption: 'value'});
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Function call from previous generated instance via dom node or instance
|
|
255
|
+
reference:
|
|
256
|
+
<!--deDE:
|
|
257
|
+
Aufruf einer Plugin-Methode anhand der zuvor generierten Instanz bzw. über
|
|
258
|
+
den zurückgegebene DOM-Knoten:
|
|
259
|
+
-->
|
|
260
|
+
|
|
261
|
+
```JavaScript
|
|
262
|
+
const returnValue = $('#domNode').Example('method', 'anArgument')
|
|
263
|
+
const returnValue = $('#domNode').Example().method('anArgument')
|
|
264
|
+
const exampleInstance = $.Example({firstOption: 'value'})
|
|
265
|
+
const returnValue = exampleInstance.method('anArgument')
|
|
266
|
+
```
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|