-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Clean up externals global variables so it works with module loaders. #1057
Clean up externals global variables so it works with module loaders. #1057
Conversation
…n global variables. Attempting to use dash.js with module loader javascript frameworks such as web pack or browserify was not working well. This was because of global libraries that were not being included using require or import syntax. Removing this global variable leak fixes the issues when incorporating it into many modern stacks. External libraries have been updated and all source files requiring them are explicitly using the ‘import from …’ syntax. Gruntfile and .jshintrc have been updated. It now builds into a single all.min.js file
@@ -148,7 +114,7 @@ module.exports = function (grunt) { | |||
}, | |||
all: { | |||
files: { | |||
'build/temp/dash.no-externals.debug.js': ['src/All.js'] | |||
'build/temp/dash.all.min.js': ['src/All.js'] |
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.
This should be something like build/temp/dash.all.debug.js
Then we would have an uglify step that would convert dash.all.debug.js
into dash.all.min.js
. The dist
copy will need to be upgraded accordingly.
This is looking really good although we're still missing one piece. The Once that's taken care of we'll get to update the samples again :) I can take care of that once this lands though. @AkamaiDASH if you ping me with an @ mention when you land this I'll update the samples. |
Additionally, if we don't want to wait another round you can land this and I'll update the copy command and the samples real quick. |
@boushley do you have rights to commit this PR? |
Indeed |
Clean up externals global variables so it works with module loaders.
Should this PR also have removed |
yes I believe you are correct and missed that. I will make sure we are ok if we remove from external and commit. Thanks @bbcrddave |
Attempting to use dash.js with module loader javascript frameworks such
as web pack or browserify was not working well. This was because of
global libraries that were not being included using require or import
syntax. Removing this global variable leak fixes the issues when
incorporating it into many modern stacks.
External libraries have been updated and all source files requiring
them are explicitly using the ‘import from …’ syntax. Gruntfile and
.jshintrc have been updated.
It now builds into a single all.min.js file