-
Notifications
You must be signed in to change notification settings - Fork 33
Converting an existing project to a blueprint
This page guides you through the process of converting an existing app or graphic into a blueprint.
This guide assumes that your original app uses
middleman
. But the steps are applicable to any app
You probably built the app for a one time use and it contains a lot of project specific code and content. The first step is to clean all that out and refactor the code till you are left with only the part you want to keep in your blueprint.
At the end of this step, your app should have an index.html.erb
path that returns just the blueprint contents.
Now that you have a clean and minimal app, you should figure out what inputs you need to collect from the user. Are the inputs going to come directly from Autotune form or do you need a spreadsheet? If you are going to use a spreadsheet or other data source, look for a way to bring this data into javascript as JSON. We recommend middleman-google_drive
.
At the root of the project add autotune-config.json
to build an Alpaca form to accept inputs you decided in step 2. Instructions are here
Set up a data\autotune.json
file with example data. Follow instructions here
Update the index.html.erb
page to pass the data to the javascript as shown here
Update your app to remove any hardcoding and references to local data. Instead use AUTOTUNE
JavaScript object to get data.
Running your project locally should work at this point. Fix any errors.
Make sure that it is using data from the newly-created data\autotune.json
file.
At the root of the project, add a autotune-build
file and configure it to build the project. See instructions here.
Finally, create an [[embed.txt
| How-to-create-a-blueprint#required-files]] or embed.txt.erb
file that will return the embed code for the project. See examples here
Push your code to the master branch of a repo accessible from your Autotune setup. Follow instructions to add the blueprint to Autotune.