1234567891011121314151617181920 |
- // scripts/password-check.js
- const readline = require('readline');
- const rl = readline.createInterface({
- input: process.stdin,
- output: process.stdout,
- });
- rl.question('请输入密码: ', (password) => {
- rl.close();
- if (password === 'admin') {
- // 替换为你的实际密码
- console.log('密码正确,开始打包...');
- process.exit(0);
- } else {
- console.error('密码错误,打包终止!');
- process.exit(1);
- }
- });
|