-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
NPM and Typescript support #647
Draft
ambientlight
wants to merge
14
commits into
copy:master
Choose a base branch
from
glasssh:feat/npmts_upstream
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+663
−79
Draft
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
caaba6b
package.json and .npmrc for github package registry
ambientlight 2b95862
base typescript definitions
ambientlight d7dafb6
expose bus
ambientlight f793b31
Merge branch 'copy:master' into feat/ts
ambientlight 5e0a5ab
Merge branch 'copy:master' into feat/npm
ambientlight 9e0a2c1
Merge branch 'feat/ts' into feat/npmts_upstream
ambientlight d65220d
include types in package.json
ambientlight a49e2b5
add bios and debug bundled to files
ambientlight 7176ad2
remove github registry .npmrc, change links to @copy
ambientlight af37e1d
check for commonjs first in exports statements, commonjs exports for …
ambientlight 2e7686c
v86 module in typings
ambientlight 2615213
address review comments
ambientlight 1c34108
change package name and version
ambientlight a237df8
distribute with libwabt and capstone-x86
ambientlight 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are only for debugging, I don't think they should be included in a release build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the bundlers will parse the debug.js requires by defaults and would try to bundle those - if we don’t distribute them the bundlers would complain unless we add explicit externs, my thought here was is to make bundling succeed on defaults, but we can also do something so that the compiled code does not contain require() on those two libraries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. If you add
if(!DEBUG) return;
to the beginning of the functions that callrequire
that should cause closure compiler to remove those calls. Alternatively, I'd fine with removing the require call entirely. I haven't used those libraries from node in a long time anyway.