puppylog 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/.gitattributes +2 -0
- package/README.md +17 -0
- package/package.json +22 -0
- package/puppylog-1.0.0.tgz +0 -0
- package/src/index.js +53 -0
package/.gitattributes
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# puppylog
|
|
2
|
+
|
|
3
|
+
Coloured logging, ported to npm. Another useless file taken out of my projects!
|
|
4
|
+
|
|
5
|
+
Essentially just a chalk wrapper.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
`npm install puppylog`
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```js
|
|
12
|
+
import log from 'puppylog';
|
|
13
|
+
|
|
14
|
+
log.success('server started');
|
|
15
|
+
log.error('something broke');
|
|
16
|
+
log.pink('pink text');
|
|
17
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "puppylog",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Coloured logging, ported to npm. Another useless file taken out of my projects!",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./src/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./src/index.js"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"log",
|
|
12
|
+
"logger",
|
|
13
|
+
"chalk",
|
|
14
|
+
"console",
|
|
15
|
+
"colors"
|
|
16
|
+
],
|
|
17
|
+
"author": "onlypuppy7",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"chalk": "^5.6.2"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
Binary file
|
package/src/index.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
|
|
3
|
+
const log = {
|
|
4
|
+
green: (...args) => console.log(chalk.green(...args)),
|
|
5
|
+
red: (...args) => console.log(chalk.red(...args)),
|
|
6
|
+
yellow: (...args) => console.log(chalk.yellow(...args)),
|
|
7
|
+
blue: (...args) => console.log(chalk.blue(...args)),
|
|
8
|
+
cyan: (...args) => console.log(chalk.cyan(...args)),
|
|
9
|
+
magenta: (...args) => console.log(chalk.magenta(...args)),
|
|
10
|
+
white: (...args) => console.log(chalk.white(...args)),
|
|
11
|
+
gray: (...args) => console.log(chalk.gray(...args)),
|
|
12
|
+
black: (...args) => console.log(chalk.black(...args)),
|
|
13
|
+
pink: (...args) => console.log(chalk.hex('#FFC0CB')(...args)),
|
|
14
|
+
orange: (...args) => console.log(chalk.hex('#FFA500')(...args)),
|
|
15
|
+
purple: (...args) => console.log(chalk.hex('#800080')(...args)),
|
|
16
|
+
brown: (...args) => console.log(chalk.hex('#A52A2A')(...args)),
|
|
17
|
+
beige: (...args) => console.log(chalk.hex('#F5F5DC')(...args)),
|
|
18
|
+
|
|
19
|
+
bgGreen: (...args) => console.log(chalk.bgGreen(...args)),
|
|
20
|
+
bgRed: (...args) => console.log(chalk.bgRed(...args)),
|
|
21
|
+
bgYellow: (...args) => console.log(chalk.bgYellow(...args)),
|
|
22
|
+
bgBlue: (...args) => console.log(chalk.bgBlue(...args)),
|
|
23
|
+
bgCyan: (...args) => console.log(chalk.bgCyan(...args)),
|
|
24
|
+
bgMagenta: (...args) => console.log(chalk.bgMagenta(...args)),
|
|
25
|
+
bgWhite: (...args) => console.log(chalk.bgWhite(...args)),
|
|
26
|
+
bgGray: (...args) => console.log(chalk.bgGray(...args)),
|
|
27
|
+
bgBlack: (...args) => console.log(chalk.bgBlack(...args)),
|
|
28
|
+
bgPink: (...args) => console.log(chalk.bgHex('#FFC0CB')(...args)),
|
|
29
|
+
bgOrange: (...args) => console.log(chalk.bgHex('#FFA500')(...args)),
|
|
30
|
+
bgPurple: (...args) => console.log(chalk.bgHex('#800080')(...args)),
|
|
31
|
+
bgBrown: (...args) => console.log(chalk.bgHex('#A52A2A')(...args)),
|
|
32
|
+
bgBeige: (...args) => console.log(chalk.bgHex('#F5F5DC')(...args)),
|
|
33
|
+
|
|
34
|
+
bold: (...args) => console.log(chalk.bold(...args)),
|
|
35
|
+
italic: (...args) => console.log(chalk.italic(...args)),
|
|
36
|
+
underline: (...args) => console.log(chalk.underline(...args)),
|
|
37
|
+
strikethrough: (...args) => console.log(chalk.strikethrough(...args)),
|
|
38
|
+
dim: (...args) => console.log(chalk.dim(...args)),
|
|
39
|
+
|
|
40
|
+
success: (...args) => console.log(chalk.green.bold('[SUCCESS]', ...args)),
|
|
41
|
+
error: (...args) => console.log(chalk.red.bold('[ERROR]', ...args)),
|
|
42
|
+
warning: (...args) => console.log(chalk.yellow.bold('[WARN]', ...args)),
|
|
43
|
+
info: (...args) => console.log(chalk.blue.bold('[INFO]', ...args)),
|
|
44
|
+
highlight: (...args) => console.log(chalk.bgYellow.black.bold(...args)),
|
|
45
|
+
muted: (...args) => console.log(chalk.gray.italic(...args)),
|
|
46
|
+
special: (...args) => console.log(chalk.cyan.underline(...args)),
|
|
47
|
+
|
|
48
|
+
custom: (message, color) => console.log(chalk[color](message)),
|
|
49
|
+
customBg: (message, color) => console.log(chalk.bgKeyword(color)(message))
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default log;
|
|
53
|
+
export { log };
|