Skip to content
This repository has been archived by the owner on Oct 3, 2021. It is now read-only.

Sandbox to quickly test out modules #3

Open
lateef-k opened this issue Nov 28, 2019 · 1 comment
Open

Sandbox to quickly test out modules #3

lateef-k opened this issue Nov 28, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@lateef-k
Copy link
Collaborator

lateef-k commented Nov 28, 2019

Right now it's a pain to test out a module, you'd have pepper console.logs around the module, open toolPage.html, select a sequence, select your tool and run it, every time you're debugging.

Sequence on the other hand are much easier to try out quickly. Say I wanted to see if my naturals sequence is working correctly, I can very quickly append these lines to sequenceNaturals.js:

naturals = GEN_Naturals({'includezero': false}) // GEN_Naturals() returns out function
console.log(naturals(0)) //1
console.log(naturals(1)) //2
console.log(naturals(2)) //3 

And then run file with node:

$ node sequenceNaturals.js

Which returns

1
2
3

Unfortunately the drawing modules naturally need browser for testing, what we can do is have a sort of sandbox.html that loads somemodule.js and a configurable sandbox.js which automatically selects a sequence for testing and runs the canvas as soon as the HTML is open. That way you can have the console open for any console.log statements, and you can just refresh the browser and see the changes you made without having to go through the panels.

@lateef-k lateef-k added the enhancement New feature or request label Nov 28, 2019
@lateef-k
Copy link
Collaborator Author

8eca7cc

I'll do a write up soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant