mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 16:46:19 +08:00
chore: chalk is replaced by piccolors
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import inquirer from 'inquirer';
|
import inquirer from 'inquirer';
|
||||||
import chalk from 'chalk';
|
import colors from 'picocolors';
|
||||||
import pkg from '../../../package.json';
|
import pkg from '../../../package.json';
|
||||||
|
|
||||||
async function generateIcon() {
|
async function generateIcon() {
|
||||||
@@ -64,7 +64,7 @@ async function generateIcon() {
|
|||||||
}
|
}
|
||||||
fs.emptyDir(path.join(process.cwd(), 'node_modules/.vite'));
|
fs.emptyDir(path.join(process.cwd(), 'node_modules/.vite'));
|
||||||
console.log(
|
console.log(
|
||||||
`✨ ${chalk.cyan(`[${pkg.name}]`)}` + ' - Icon generated successfully:' + `[${prefixSet}]`,
|
`✨ ${colors.cyan(`[${pkg.name}]`)}` + ' - Icon generated successfully:' + `[${prefixSet}]`,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
import { GLOB_CONFIG_FILE_NAME, OUTPUT_DIR } from '../constant';
|
import { GLOB_CONFIG_FILE_NAME, OUTPUT_DIR } from '../constant';
|
||||||
import fs, { writeFileSync } from 'fs-extra';
|
import fs, { writeFileSync } from 'fs-extra';
|
||||||
import chalk from 'chalk';
|
import colors from 'picocolors';
|
||||||
|
|
||||||
import { getEnvConfig, getRootPath } from '../utils';
|
import { getEnvConfig, getRootPath } from '../utils';
|
||||||
import { getConfigFileName } from '../getConfigFileName';
|
import { getConfigFileName } from '../getConfigFileName';
|
||||||
@@ -31,10 +31,10 @@ function createConfig(params: CreateConfigParams) {
|
|||||||
fs.mkdirp(getRootPath(OUTPUT_DIR));
|
fs.mkdirp(getRootPath(OUTPUT_DIR));
|
||||||
writeFileSync(getRootPath(`${OUTPUT_DIR}/${configFileName}`), configStr);
|
writeFileSync(getRootPath(`${OUTPUT_DIR}/${configFileName}`), configStr);
|
||||||
|
|
||||||
console.log(chalk.cyan(`✨ [${pkg.name}]`) + ` - configuration file is build successfully:`);
|
console.log(colors.cyan(`✨ [${pkg.name}]`) + ` - configuration file is build successfully:`);
|
||||||
console.log(chalk.gray(OUTPUT_DIR + '/' + chalk.green(configFileName)) + '\n');
|
console.log(colors.gray(OUTPUT_DIR + '/' + colors.green(configFileName)) + '\n');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(chalk.red('configuration file configuration file failed to package:\n' + error));
|
console.log(colors.red('configuration file configuration file failed to package:\n' + error));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
// #!/usr/bin/env node
|
// #!/usr/bin/env node
|
||||||
|
|
||||||
import { runBuildConfig } from './buildConf';
|
import { runBuildConfig } from './buildConf';
|
||||||
import chalk from 'chalk';
|
import colors from 'picocolors';
|
||||||
|
|
||||||
import pkg from '../../package.json';
|
import pkg from '../../package.json';
|
||||||
|
|
||||||
@@ -14,9 +14,9 @@ export const runBuild = async () => {
|
|||||||
runBuildConfig();
|
runBuildConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`✨ ${chalk.cyan(`[${pkg.name}]`)}` + ' - build successfully!');
|
console.log(`✨ ${colors.cyan(`[${pkg.name}]`)}` + ' - build successfully!');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(chalk.red('vite build error:\n' + error));
|
console.log(colors.red('vite build error:\n' + error));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -111,6 +111,7 @@
|
|||||||
"less": "^4.1.2",
|
"less": "^4.1.2",
|
||||||
"lint-staged": "12.3.7",
|
"lint-staged": "12.3.7",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
|
"picocolors": "^1.0.0",
|
||||||
"postcss": "^8.4.12",
|
"postcss": "^8.4.12",
|
||||||
"postcss-html": "^1.3.0",
|
"postcss-html": "^1.3.0",
|
||||||
"postcss-less": "^6.0.0",
|
"postcss-less": "^6.0.0",
|
||||||
|
2
pnpm-lock.yaml
generated
2
pnpm-lock.yaml
generated
@@ -68,6 +68,7 @@ specifiers:
|
|||||||
npm-run-all: ^4.1.5
|
npm-run-all: ^4.1.5
|
||||||
nprogress: ^0.2.0
|
nprogress: ^0.2.0
|
||||||
path-to-regexp: ^6.2.0
|
path-to-regexp: ^6.2.0
|
||||||
|
picocolors: ^1.0.0
|
||||||
pinia: 2.0.12
|
pinia: 2.0.12
|
||||||
postcss: ^8.4.12
|
postcss: ^8.4.12
|
||||||
postcss-html: ^1.3.0
|
postcss-html: ^1.3.0
|
||||||
@@ -196,6 +197,7 @@ devDependencies:
|
|||||||
less: 4.1.2
|
less: 4.1.2
|
||||||
lint-staged: 12.3.7
|
lint-staged: 12.3.7
|
||||||
npm-run-all: 4.1.5
|
npm-run-all: 4.1.5
|
||||||
|
picocolors: 1.0.0
|
||||||
postcss: 8.4.12
|
postcss: 8.4.12
|
||||||
postcss-html: 1.3.0
|
postcss-html: 1.3.0
|
||||||
postcss-less: 6.0.0_postcss@8.4.12
|
postcss-less: 6.0.0_postcss@8.4.12
|
||||||
|
Reference in New Issue
Block a user