Coder Social home page Coder Social logo

Comments (20)

timoxley avatar timoxley commented on September 25, 2024

This is the boilerplate content generated for the user for the exercise.

e.g.

module.exports = function(arg) {
  // your solution here
}

from adventure-map.

Sequoia avatar Sequoia commented on September 25, 2024

mmm. but... why is it included in exports? is it consumed somewhere? oh, can users get it via workshopname boilerplate?

from adventure-map.

timoxley avatar timoxley commented on September 25, 2024

it automatically dumps it into the user's solution directory.

I should probably expose this so it's less magical.

from adventure-map.

Sequoia avatar Sequoia commented on September 25, 2024

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?

from adventure-map.

timoxley avatar timoxley commented on September 25, 2024

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.

from adventure-map.

timoxley avatar timoxley commented on September 25, 2024

this is an assumption though and I should make it clearer how to turn this off or customise it.

from adventure-map.

Sequoia avatar Sequoia commented on September 25, 2024

cool. I think boilerplate but it would be nice to be able to disable it, perhaps by simply not exporting a boilerplate property or setting exports.boilerplate to false.

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 & lesson-name/ will be created in the current directory."

from adventure-map.

timoxley avatar timoxley commented on September 25, 2024

Sounds good!

from adventure-map.

Sequoia avatar Sequoia commented on September 25, 2024

OK assign me then & I'll get to it when I have a mo.

from adventure-map.

timoxley avatar timoxley commented on September 25, 2024

Added you as collab 🎉

Also note: #3

from adventure-map.

Sequoia avatar Sequoia commented on September 25, 2024

Planning to prompt to create boilerplate files on first run & just leave it at that, simplifies behavior muchly.

from adventure-map.

timoxley avatar timoxley commented on September 25, 2024

@Sequoia sounds good

from adventure-map.

Sequoia avatar Sequoia commented on September 25, 2024

Wow

from adventure-map.

timoxley avatar timoxley commented on September 25, 2024

🎆

from adventure-map.

Sequoia avatar Sequoia commented on September 25, 2024

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!

from adventure-map.

timoxley avatar timoxley commented on September 25, 2024

haha hopefully your pocket can start sending PRs

from adventure-map.

Sequoia avatar Sequoia commented on September 25, 2024

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.

from adventure-map.

timoxley avatar timoxley commented on September 25, 2024

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):

  • Prompt to generate all boilerplate when one is missing (current behaviour)
  • Prompt to generate all boilerplate at startup
  • Prompt to generate boilerplate for specific exercise, if missing
  • Allow user to opt out of auto-boilerplate generation forever
  • Allow user to manually generate the current boilerplate via a command
  • Prompt whenever exercise selected
  • Prompt only on first selection of exercise
  • No prompting on selection of exercise at all
  • Prompt whenever workshop is run (current behaviour)
  • Prompt only on first startup of workshop

from adventure-map.

timoxley avatar timoxley commented on September 25, 2024

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.

from adventure-map.

Sequoia avatar Sequoia commented on September 25, 2024

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...

from adventure-map.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.