v1.2.9
✨ 暴露插件内部使用的库以及环境变量,可以在物料编译前后的外部 script 中使用
const path = require("path");
module.exports = {
beforeCompile: (context) => {},
afterCompile: (context) => {
context.outputChannel.appendLine(__dirname);
context.outputChannel.appendLine(__filename);
context.outputChannel.appendLine(process.cwd());
context.outputChannel.appendLine(JSON.stringify(context.model));
if (!context.model.includeModifyModal) {
context.libs.fsExtra.removeSync(
path.join(path.join(context.env.tempWorkPath, "src", "ModifyModal")),
);
}
},
};