-
-
Notifications
You must be signed in to change notification settings - Fork 185
Out file support #648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Out file support #648
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
a1825a1
Implement bundle transformation
hazzard993 2d164c2
Merge remote-tracking branch 'upstream/master' into out-file
hazzard993 eb05fcb
Remove unneeded changes
hazzard993 74ef4e3
Merge remote-tracking branch 'upstream/master' into out-file
hazzard993 299fda8
Add option luaModuleSystem
hazzard993 e983764
Update luaModule system test name
hazzard993 c6447c4
Improve formatting of luaModuleSystem test
hazzard993 c50ad14
Remove luaModuleSystem
hazzard993 635ba3b
Add string array luaEntry option
hazzard993 e777b88
Allow luaEntry to be specified via command line
hazzard993 1606517
Ensure outFile tests are run
hazzard993 7b17745
Support cyclic imports in output bundles
hazzard993 7c6ab11
Split up outFile tests
hazzard993 d36356d
Resolve luaEntry paths relative to tsconfig
hazzard993 ba2cc1f
Reduce luaEntry option to a string naming a module to export
hazzard993 69ad1b0
Use bundle exports in outFile tests
hazzard993 4634d63
Remove string array parsing
hazzard993 b2ab7db
Remove describe from outFile tests
hazzard993 b683a48
Allow export equals in bundles
hazzard993 cc71c2a
Use seperate variables for bundle module system
hazzard993 8972539
Add primative type command line option
hazzard993 6500548
Refactor to new transformSourceFileWithState method
hazzard993 69693f0
Generate and use a full luaEntry path if project is specified
hazzard993 d45395f
Use suggested config based resolution for luaEntrys in tsconfig
hazzard993 a9a94d3
Check for configFilePath for luaEntry, not project
hazzard993 1276819
Make transformBundle private
hazzard993 16b1f04
Add default options to BundleTestBuilder
hazzard993 ecc2450
Simplify LuaLib outFile test
hazzard993 8ababd5
Update src/LuaTransformer.ts
hazzard993 1479285
Update src/LuaTransformer.ts
hazzard993 cf2b791
Rename LuaRequire globals
hazzard993 e43f841
Refactor undefined configFilePath condition in transformer
hazzard993 bda19b8
Change requireCallString to requireFunctionName
hazzard993 0c700d4
Disable lint rule in LuaRequire and fix transformer
hazzard993 e1e6964
Avoid mutable luaEntryPath in LuaTransformer
hazzard993 b95f068
Use camelCasing in LuaRequire
hazzard993 2d7e1ce
Inline variables in outFile tests
hazzard993 360fdd2
Improve cyclic import outFile test
hazzard993 d40a619
Allow optional TranspileError node parameter
hazzard993 5d63ba8
Move transformSourceFileWithState above transformSourceFile
hazzard993 cb560be
Merge remote-tracking branch 'upstream/master' into out-file
hazzard993 c50805f
Merge remote-tracking branch 'upstream/master' into out-file
hazzard993 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // tslint:disable: variable-name | ||
| const ____modules: Record<string, (this: void, exports: object) => any> = {}; | ||
| const ____moduleCache: Record<string, any> = {}; | ||
|
|
||
| function __TS__LuaRequire(this: void, moduleName: string): any { | ||
| if (____moduleCache[moduleName]) { | ||
| return ____moduleCache[moduleName]; | ||
| } | ||
| const loadScript = ____modules[moduleName]; | ||
| if (!loadScript) { | ||
| // tslint:disable-next-line: no-string-throw | ||
| throw `module '${moduleName}' not found`; | ||
| } | ||
| const moduleExports = {}; | ||
| ____moduleCache[moduleName] = moduleExports; | ||
| ____moduleCache[moduleName] = loadScript(moduleExports); | ||
| return ____moduleCache[moduleName]; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.