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

Add ability to use extra JavaScript files #4

Open
acknosyn opened this issue Sep 17, 2016 · 2 comments
Open

Add ability to use extra JavaScript files #4

acknosyn opened this issue Sep 17, 2016 · 2 comments

Comments

@acknosyn
Copy link

I use a library which is in an extra JavaScript file. I can change the index.html to include my extra file and that works perfectly fine locally. The problem is the p5bot uses a static index.html, so any changes made in index.html aren't used. Which means at the moment, we can't use any additional files.

It would still work if you pasted any extra libraries or custom JavaScript in bot.js, but this isn't ideal. I think it's almost essential for people to have the ability to add their own separate files.

I have a couple ideas on how this could be implemented:
1: (Probably the easiest) Copy the users index.html instead of using the example index.html.
2: Have some sort of json file or similar where you can add the name of the files you want in index.html. Any files would get injected into the example index.html before bot.js.

@Ace-Key
Copy link

Ace-Key commented Sep 19, 2016

This would definitely be useful for those of us that may use less compatible plugins for the current framework we have. I think most of us would probably experience some issue with regards to being able to implement some plugin types. I do know that even using some basic framework code for api's like Twitch api leads to some authentication difficulty - and of course problems.

I also woulda thought that the index.html pasted into the twitterbot is each our own to begin with, or does the framework sorta constrain us with that regard? Anyway nice idea that broadens our creative bounds!

@chrisDoran
Copy link

chrisDoran commented Sep 20, 2016

I had plenty of issues with this framework and dealing with libraries and such. I found it impossible to include libraries in file form at all, instead I needed to use CDN codes in index.html. Other options I tried had issues with Gist and the framework. I think this is certainly an area that the framework needs to expand on.

EDIT: I take that back, I now have a huge library in my bot.js. I was fooled.

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

3 participants