Update: 执行 build:prod 时同时构建示例文件的map

This commit is contained in:
王立帮
2024-11-28 20:30:58 +08:00
parent edc2746133
commit 905e7c14ea
22 changed files with 44 additions and 23 deletions

View File

@@ -10,7 +10,8 @@ const program = new Command();
program
.addOption(new Option('-t, --type <string>', 'boards type', 'all').choices([
'all', 'special'
]));
]))
.addOption(new Option('--obfuscate', 'obfuscate file names'));
program.parse();
@@ -116,7 +117,7 @@ if (fs_plus.isDirectorySync(DEFAULT_DIR)) {
continue;
}
let outputPath = path.resolve(examplesPath, 'map.json');
let output = getExamples(examplesPath, true);
let output = getExamples(examplesPath, !!options.obfuscate);
fs_extra.outputJsonSync(outputPath, output, {
spaces: ' '
});