1 | const chalk = require('chalk');
|
2 | const figures = require('figures');
|
3 |
|
4 | const prefix = `${chalk.gray('next-optimized-images')} ${chalk.red(figures.pointer)}`;
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | const showWarning = () => console.log(
|
11 | `${prefix} ${chalk.red('WARNING!')}
|
12 | ${prefix} ${chalk.red('No package found which can optimize images.')}
|
13 | ${prefix} Starting from version ${chalk.cyan('2')} of ${chalk.cyan('next-optimized-images')}, all optimization is optional and you can choose which ones you want to use.
|
14 | ${prefix} For help during the setup and installation, please read ${chalk.underline('https://github.com/cyrilwanner/next-optimized-images#optimization-packages')}
|
15 |
|
16 | ${prefix} If you recently ${chalk.cyan('updated from v1 to v2')}, please read ${chalk.underline('https://github.com/cyrilwanner/next-optimized-images/blob/master/UPGRADING.md')}
|
17 | ${prefix} If this is on purpose and you don't want this plugin to optimize the images, set the option ${chalk.cyan('`optimizeImages: false`')} to hide this warning.
|
18 | `,
|
19 | );
|
20 |
|
21 | module.exports = {
|
22 | showWarning,
|
23 | };
|