Skip to content
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

guidance on compiling FA2 and custom plugin #332

Closed
1tylermitchell opened this issue Jul 5, 2014 · 2 comments
Closed

guidance on compiling FA2 and custom plugin #332

1tylermitchell opened this issue Jul 5, 2014 · 2 comments

Comments

@1tylermitchell
Copy link

I'm copying the FA2 plugin and want to recompile it with a different name, I started by just renaming all the forceAtlas2 ref to Bubble, etc. :)

But I can't seem to get the run build command to create the plugin .js file. Neither the FA2 plugin or the custom named one. Any tip would be appreciated.

I added it to Gruntfile.js:
var plugins = [ 'layout.forceAtlas2', 'layout.bubble', ...

@Yomguithereal
Copy link
Collaborator

The FA2 plugin is quite peculiar in that he needs his own grunt task to be built. This is needed because the algorithm is written at a very low-level and some readability helpers have to be crushed when the code is built so its execution remains optimal.

So, in order to be able to run sub grunt tasks, sigma.js uses the grunt-grunt module. Therefore, if a plugin contains a Gruntfile, sigma.js will read it and act accordingly.

So, you have two problems here: one is that npm run build is an alias for grunt uglify and FA2 is not built with this task (but this is something I'll correct asap). The second problem being that you might want to edit your plugin sub gruntfile.js or even remove it if you don't need fancy tasks to be run and if a simple uglify suffice.

So, for the time being, what you need to do, before I correct the build command, is to either remove the Gruntfile.js from your plugin's folder and run npm run build or edit the Gruntfile.js and run grunt grunt.

@Yomguithereal
Copy link
Collaborator

I just pushed a commit fixing the build task. It should now build the FA2 plugin. Just keep in mind to edit or remove the Gruntfile.js in your plugin's folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants