Skip to content

Commit

Permalink
patch caveat again
Browse files Browse the repository at this point in the history
  • Loading branch information
AidasPa committed Mar 12, 2021
1 parent 56b821c commit a82d297
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion compiler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = (code) => {
}
if (new RegExp(className).test(line)) {
if (firstClassReferenceLine === null) {
firstClassReferenceLine = i;
firstClassReferenceLine = i - 1;
}
return line;
}
Expand Down
7 changes: 2 additions & 5 deletions compiler/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = {
injectCompiledClass(code, line, className) {
const [hash, classLine] = buildCompiledClass(className);
code.splice(line + 4, 0, ...[null, classLine]);
console.log(code);
return [hash, code];
},
replaceClassReferenceToCompiled(className, hash, line) {
Expand Down Expand Up @@ -82,11 +83,7 @@ module.exports = {
return [line, shouldReplace];
},
injectBootstrap(code) {
code.unshift(`
Context.RunFile('aliases.js');\n
Context.RunFile('polyfill/unrealengine.js');\n
Context.RunFile('polyfill/timers.js');\n
`);
code.unshift('Context.RunFile(\'aliases.js\');Context.RunFile(\'polyfill/unrealengine.js\');Context.RunFile(\'polyfill/timers.js\');');
return code;
},
injectProperties(code, propertyBag, targetLine) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aidaspa/uts",
"version": "0.13.4",
"version": "0.13.5",
"description": "UnrealJS + TypeScript Toolkit",
"main": "index.js",
"keywords": [
Expand Down

0 comments on commit a82d297

Please sign in to comment.