This is an app that generates a Practice Phase interview from randomly chosen interview pieces and a randomly chosen database. The possiblities are endless! (Or at least combinatorial.)
-
If this is your first time working with this app:
- Clone or fork the repo
npm install
-
Make sure the USB Drive is available on your computer as
/Volumes/INTERVIEW.- If
/Volume/INTERVIEWis not available, the program assumes you are simply testing, and puts the generated challenge in/var/tmp/randomInterviews
- If
-
In
utilities/data_maker.js:- set
DBandVERSION(just after therequires) to- a db name and a version letter if you want to choose those explicitly
nullif you want them to be chosen randomly- it's ok to set one explicitly and let the other be random
- set
-
Run
npm run build <learner name>where<learner name>is the name of the learner taking the challenge -
Voila! Everything will just show up in a directory with the learner's name and date on the drive.
-
Copy the file structure template
$ cd challenges/versions/$ cp -r _template <new version letter>(where<new version letter>is the next available challenge letter not already taken in that directory (e.g.f))
-
Inside the new directory, there will be:
- A
template_strings.jsfile - An
instructionsdirectory - A
srcdirectory
- A
-
In the
template_strings.jsfile, fill out thestring_makerfunction (note: You will probably do steps 3, 4, and 5 at the same time, switching back and forth as needed.)- See the
template_strings.jsfile in theadirectory for an example - This function should generate strings needed for the challenge (for example, the database function name)
- The strings should be composed of strings that come from:
challenges/db_data/<db_name>/strings.js, andutilities/data_maker.jsbuildTemplateDatafunction (which draws from thechallenges/db_data/<db_name>/schema.yamlfile)
- use these template strings to make the below files generic (i.e. applicable to whatever random database is selected for the challenge)
- See the
-
In the
instructionsdirectory- Write the
p*.mustachefiles to contain markdown for that part's instructions- see existing
p*.mustachefiles for examples
- see existing
- Write the
-
In the
srcdirectory- Complete the
/src/app/p3.mustache- This should be the version of the
app.jsneeded for part-3 - The template partials are already there; you simply need to fill in the route (e.g.
app.get()) for this section.
- This should be the version of the
- In the
dbdirectory, complete these two files:db.js: The completed database function needed for parts 2 and 3 of the challenge (the partials are already written, as is the beginning of the definition of the function)jsDoc.mustache: JSDoc for the database function defined indb.js
- In the
publicdirectory:- Fill in
p3-css.mustacheandp3-js.mustachefor this version. - Depending on the challenge, one or both of these may be blank.
- Fill in
- In the
viewsdirectory:- Fill in the
p2-*.mustachefiles to scaffold for part-2 (these should be minimal, as part-2 requires usingpugorejsto create a view) - Fill in the
p2-*.mustachefiles to scaffold for part-3 (this will be more complete, as part-3 is DOM manipulation)
- Fill in the
- Complete the
-
Update tests
- TBD
Instructions coming soon