You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
951 B
25 lines
951 B
"use strict"; |
|
//FYI: https://github.com/Tencent/puerts/blob/master/doc/unity/manual.md |
|
Object.defineProperty(exports, "__esModule", { value: true }); |
|
exports.onDestroy = exports.onPublish = void 0; |
|
const CodeGenConfig_1 = require("./CodeGenConfig"); |
|
const FUICodeGenerator_1 = require("./FUICodeGenerator"); |
|
const NormalCodeGenerator_1 = require("./NormalCodeGenerator"); |
|
function onPublish(handler) { |
|
if (!handler.genCode) |
|
return; |
|
handler.genCode = false; //prevent default output |
|
console.log('Handling gen code in plugin'); |
|
if (CodeGenConfig_1.CodeGenConfig.NormalAutoGeneratePkgs.includes(handler.pkg.name)) { |
|
NormalCodeGenerator_1.normalCodeGenerator.Handle(handler); |
|
} |
|
else { |
|
FUICodeGenerator_1.fuiCodeGenerator.Handle(handler); |
|
} |
|
console.log('Handling gen code in plugin end'); |
|
} |
|
exports.onPublish = onPublish; |
|
function onDestroy() { |
|
//do cleanup here |
|
} |
|
exports.onDestroy = onDestroy;
|
|
|