puppylog 1.1.0 → 1.2.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/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "puppylog",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Coloured logging, ported to npm. Another useless file taken out of my projects!",
5
5
  "type": "module",
6
+ "types": "./index.d.ts",
6
7
  "main": "./src/index.js",
7
8
  "exports": {
8
9
  ".": "./src/index.js"
package/src/index.d.ts ADDED
@@ -0,0 +1,84 @@
1
+ export type LogFn = (...args: any[]) => void;
2
+
3
+ export interface PuppyLog {
4
+ green: LogFn;
5
+ red: LogFn;
6
+ yellow: LogFn;
7
+ blue: LogFn;
8
+ cyan: LogFn;
9
+ magenta: LogFn;
10
+ white: LogFn;
11
+ gray: LogFn;
12
+ black: LogFn;
13
+ pink: LogFn;
14
+ orange: LogFn;
15
+ purple: LogFn;
16
+ brown: LogFn;
17
+ beige: LogFn;
18
+
19
+ bgGreen: LogFn;
20
+ bgRed: LogFn;
21
+ bgYellow: LogFn;
22
+ bgBlue: LogFn;
23
+ bgCyan: LogFn;
24
+ bgMagenta: LogFn;
25
+ bgWhite: LogFn;
26
+ bgGray: LogFn;
27
+ bgBlack: LogFn;
28
+ bgPink: LogFn;
29
+ bgOrange: LogFn;
30
+ bgPurple: LogFn;
31
+ bgBrown: LogFn;
32
+ bgBeige: LogFn;
33
+
34
+ boldGreen: LogFn;
35
+ boldRed: LogFn;
36
+ boldYellow: LogFn;
37
+ boldBlue: LogFn;
38
+ boldCyan: LogFn;
39
+ boldMagenta: LogFn;
40
+ boldWhite: LogFn;
41
+ boldGray: LogFn;
42
+ boldBlack: LogFn;
43
+ boldPink: LogFn;
44
+ boldOrange: LogFn;
45
+ boldPurple: LogFn;
46
+ boldBrown: LogFn;
47
+ boldBeige: LogFn;
48
+
49
+ italicGreen: LogFn;
50
+ italicRed: LogFn;
51
+ italicYellow: LogFn;
52
+ italicBlue: LogFn;
53
+ italicCyan: LogFn;
54
+ italicMagenta: LogFn;
55
+ italicWhite: LogFn;
56
+ italicGray: LogFn;
57
+ italicBlack: LogFn;
58
+ italicPink: LogFn;
59
+ italicOrange: LogFn;
60
+ italicPurple: LogFn;
61
+ italicBrown: LogFn;
62
+ italicBeige: LogFn;
63
+
64
+ bold: LogFn;
65
+ italic: LogFn;
66
+ underline: LogFn;
67
+ strikethrough: LogFn;
68
+ dim: LogFn;
69
+
70
+ success: LogFn;
71
+ error: LogFn;
72
+ warning: LogFn;
73
+ info: LogFn;
74
+ highlight: LogFn;
75
+ muted: LogFn;
76
+ special: LogFn;
77
+
78
+ custom(message: string, color: string): void;
79
+ customBg(message: string, color: string): void;
80
+ }
81
+
82
+ export const log: PuppyLog;
83
+
84
+ export default log;
package/src/index.js CHANGED
@@ -1,5 +1,9 @@
1
1
  import chalk from 'chalk';
2
2
 
3
+ /**
4
+ * Logging helpers built on top of chalk.
5
+ * All methods print directly to stdout.
6
+ */
3
7
  export const log = {
4
8
  green: (...args) => console.log(chalk.green(...args)),
5
9
  red: (...args) => console.log(chalk.red(...args)),