forked from orbita-center/react-dadata-box
-
Notifications
You must be signed in to change notification settings - Fork 0
/
postinstall.js
31 lines (29 loc) · 1.45 KB
/
postinstall.js
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
const colors = {
Reset: '\x1b[0m',
Red: '\x1b[31m',
Green: '\x1b[32m',
Yellow: '\x1b[33m'
};
const red = s => colors.Red + s + colors.Reset;
const green = s => colors.Green + s + colors.Reset;
console.warn(
`
╭────────────────────────────────────────────────────────────────╮
│ *** DEPRECATION WARNING **** │
│ at v1.3.5 will be deprecated variant to place customActions │
│ as React.Element it must be placed only as function that │
│ returns React.Element and take suggestions as argument │
│ see more in project README.md │
│ https://github.com/orbita-center/react-dadata-box │
╰────────────────────────────────────────────────────────────────╯
`
.replace(/─/g, red('─'))
.replace(/╭/g, red('╭'))
.replace(/╰/g, red('╰'))
.replace(/╮/g, red('╮'))
.replace(/╯/g, red('╯'))
.replace(/react-dadata-box\@1\.3\.4/g, green('[email protected]'))
.replace(/v1\.3\.5/g, green('v1.3.5'))
.replace(/deprecated/g, green('deprecated'))
);