Repository navigation
Expand file tree
/
Copy pathquick-test.html
More file actions
86 lines (73 loc) · 2.49 KB
/
Copy pathquick-test.html
File metadata and controls
86 lines (73 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
78
79
80
81
82
83
84
85
86
<!doctype html>
<html>
<head>
<script src="./dist/cdn.min.js"></script>
<script>
colorino.info('Hello from the UMD bundle!')
colorino.error('Something went wrong')
</script>
<script type="module" src="./dist/cdn.min.mjs"></script>
<script type="module">
import { createColorino } from './dist/cdn.mjs'
const colorino = createColorino()
// Standalone gradient
colorino.log(colorino.gradient('Hello!', '#ff0000', '#0000ff'))
// Gradient with additional text
colorino.log(
colorino.gradient('Hello!', '#ff0000', '#0000ff'),
'second string'
)
// Mixed with other text
const title = colorino.gradient('COLORINO', '#ffd700', '#ff1493')
colorino.info('Welcome to', title, '– the smart logger')
// Combine multiple effects
const badge = colorino.colorize('v2.0', '#00ff00')
const brand = colorino.gradient('Colorino', '#ff6b6b', '#4ecdc4')
colorino.log(brand, badge, 'shipped!')
console.log('\n--- Trace Tests: Default (hide colorino, show node) ---')
colorino.trace('test')
colorino.trace('test', new Error('TestoErroro'))
colorino.trace('test', new Error('TestoErroro').stack)
colorino.trace('test', { testo: 'objecto' })
console.log('\n--- Trace Tests: Hide both ---')
const colorino2 = createColorino(
{},
{
areNodeFramesVisible: false,
areColorinoFramesVisible: false,
}
)
colorino2.trace('test', new Error('TestoErroro'))
colorino2.trace('test', new Error('TestoErroro').stack)
colorino2.trace('test', { testo: 'objecto' })
console.log('\n--- Trace Tests: Hide node, show colorino ---')
const colorino3 = createColorino(
{},
{
areNodeFramesVisible: false,
areColorinoFramesVisible: true,
}
)
colorino3.trace('test', new Error('TestoErroro'))
colorino3.trace('test', new Error('TestoErroro').stack)
colorino3.trace('test', { testo: 'objecto' })
console.log('\n--- Trace Tests: Show both ---')
const colorino4 = createColorino(
{},
{
areNodeFramesVisible: true,
areColorinoFramesVisible: true,
}
)
colorino4.trace('test', new Error('TestoErroro'))
colorino4.trace('test', new Error('TestoErroro').stack)
colorino4.trace('test', { testo: 'objecto' })
</script>
</head>
<body></body>
</html>