HelikarLab / ccNetViz

JavaScript library for visualization of large-scale network graphs using WebGL
93 stars 43 forks source link

Using closure-webpack-plugin loader to execute google-closure-compiler #37

Open gauravgrover95 opened 5 years ago

gauravgrover95 commented 5 years ago

Webpack v4 is now supported by the closure-webpack-plugin.

We can remove the custom node script in build.js to substitute it with usage of this plugin. This will help clean up the code and make build process possibly more efficient.

hjhimanshu01 commented 5 years ago

@gauravgrover95 @saskaale , while working on #27 and this issue for building minimized build, encountered a few errors related to maybe some redundant code or undefined variables , this file has a redundant function call onWheelThis(e) , also sharing a screenshot of relevant files causing error while trying to build a webpack.config , may I remove/modify the function calls? Screenshot from 2019-04-20 07-34-48 (1)

gauravgrover95 commented 5 years ago

Well, I guess the library is working fine without fixing these errors. So, if your motive is only to compile the library for #27 and/or to check the workflow Google Closure Script to fix this particular issue, you can simply temporarily disable the use of these variables.

In the long-term, we will require a detailed analysis like why these variables are in code in the first place and take a decision on it. You can do it yourself and generate a pull-request based on your findings and put it under review for contributors of those code files.

hjhimanshu01 commented 5 years ago

@gauravgrover95 , so shall I build a minified version by commenting/removing out those unused variables? As that would basically be used in production code of gh-pages branch? The idea os to build a minified version with 'advanced examples' to be hosted via gh-pages branch.

gauravgrover95 commented 5 years ago

That will require proper investigation of the usage of the undeclared variables including other parts of the code.

You can start by simply disabling the use of those variables and correspondingly understanding the functionalities where they were utilized. You can fix the errors for essential variables by manually declaring them but keeping in consideration that they were not intentionally hoisted.

Also, Can you please share the steps to reproduce the issue?

hjhimanshu01 commented 5 years ago

@gauravgrover95 , sure , just a little bit occupied here , university exams, will share the steps soon.

statebait commented 5 years ago

Perhaps this can be closed as the google-closure-compiler is no longer used in the repository.