Skip to content

v1.2.9

Choose a tag to compare

@wjkang wjkang released this 05 Oct 12:03

✨ 暴露插件内部使用的库以及环境变量,可以在物料编译前后的外部 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")),
      );
    }
  },
};