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/INTERVIEW
is 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
DB
andVERSION
(just after therequire
s) to- a db name and a version letter if you want to choose those explicitly
null
if 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.js
file - An
instructions
directory - A
src
directory
- A
-
In the
template_strings.js
file, fill out thestring_maker
function (note: You will probably do steps 3, 4, and 5 at the same time, switching back and forth as needed.)- See the
template_strings.js
file in thea
directory 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.js
buildTemplateData
function (which draws from thechallenges/db_data/<db_name>/schema.yaml
file)
- 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
instructions
directory- Write the
p*.mustache
files to contain markdown for that part's instructions- see existing
p*.mustache
files for examples
- see existing
- Write the
-
In the
src
directory- Complete the
/src/app/p3.mustache
- This should be the version of the
app.js
needed 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
db
directory, 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
public
directory:- Fill in
p3-css.mustache
andp3-js.mustache
for this version. - Depending on the challenge, one or both of these may be blank.
- Fill in
- In the
views
directory:- Fill in the
p2-*.mustache
files to scaffold for part-2 (these should be minimal, as part-2 requires usingpug
orejs
to create a view) - Fill in the
p2-*.mustache
files 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