Skip to content

Commit

Permalink
Adding docs, removing bad old code
Browse files Browse the repository at this point in the history
  • Loading branch information
acbart committed Mar 26, 2017
1 parent 570a141 commit 4f406cb
Show file tree
Hide file tree
Showing 84 changed files with 35,639 additions and 1,493 deletions.
11 changes: 11 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
contents = input.read()
cleaned_contents = contents.replace('"', '\\"').replace('\n', '')
js_contents = '''
/**
* An automatically generated file, based on interface.html.
* An interesting problem in web development is managing HTML
* code in JS files. Rather than embedding string literals and
* concatenating them, or some other hackish soluion,
* we simply convert an HTML file to a JS string. Therefore,
* relevant edits should be in interface.html instead.
*
* The BlockPyInterface global can be seen as a constant
* representation of the default interface.
*/
BlockPyInterface = "{interface_code}";
'''.format(interface_code=cleaned_contents)
output.write(js_contents)
Loading

0 comments on commit 4f406cb

Please sign in to comment.