-
Notifications
You must be signed in to change notification settings - Fork 3
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
What does exports.boilerplate do? #7
Comments
This is the boilerplate content generated for the user for the exercise. e.g. module.exports = function(arg) {
// your solution here
} |
mmm. but... why is it included in exports? is it consumed somewhere? oh, can users get it via |
it automatically dumps it into the user's solution directory. I should probably expose this so it's less magical. |
ahhh OK thanks! what's "The user's solution directory"? When I was working thru these things there wasn't really a place to put files unless you made one. Is that another new feature? |
yeah I cloned a feature from the webgl/shaderschool workshops, where they generate a directory for each exercise up front, that directory contains the bootstrap.js and the exercise description so they don't have to keep opening and closing the workshop to review the instructions. |
this is an assumption though and I should make it clearer how to turn this off or customise it. |
cool. I think boilerplate but it would be nice to be able to disable it, perhaps by simply not exporting a I plan on adding instructions in the top-level README for my lesson-set explaining the stuff about the boilerplate code & how to get started. I think this is necessary, otherwise the "we're about to populate" message is jarring & confusing. I'll think about ways to reword it. Something like "Would you like a directory created for this exercise with a boilerplate (starting point) file? Click yes & |
Sounds good! |
OK assign me then & I'll get to it when I have a mo. |
Added you as collab 🎉 Also note: #3 |
Planning to prompt to create boilerplate files on first run & just leave it at that, simplifies behavior muchly. |
@Sequoia sounds good |
Wow |
🎆 |
What the heck man earlier I pocket texted someone A PHOTO and now I see apparently I pocket commented on a github issue?? Presumably via email. OS collaboration via pocket dial-- what a time to be alive! |
haha hopefully your pocket can start sending PRs |
I started working on this a while ago & got something mostly working, but now that I revisit it I am confused. Setup was getting run every single time the user ran the adventure command; I'm trying to change that but I'm getting hung up on exactly what's supposed to run here instead: exercises.forEach(function(exercise) {
shop.add(exercise.name, function() {
//???
})
}) I'll try to look at it more later when I get a chance. |
How to solve this I guess depends on exactly the behaviour you think is best. Select one or more of the following (or add other options):
|
Note that boilerplate generation stuff is mostly only frustrating for workshop authors while they're developing the workshop. Most users will simply get the boilerplate setup once and then work with it. Perhaps should have a way to disable it while developing or figure out a better way to serve the workshop-developer's needs. |
Nah, it's annoying if you run the workshop, switch to the new directory, run it again, then boilerplate rubs again. Tbh my next move is to just rip it out and move on, I never finished my worksheet I started about a year ago and the boilerplate stuff seems not worth the trouble... |
No description provided.
The text was updated successfully, but these errors were encountered: