merge.py 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. nodejs_in = [
  2. "src/front.js",
  3. "src/utilities.js",
  4. "src/python_errors.js",
  5. "src/ast_node_visitor.js",
  6. "src/abstract_interpreter.js",
  7. "src/pytifa.js",
  8. "src/abstract_interpreter_definitions.js",
  9. "src/treeMatching.js",
  10. "src/sk_mod_instructor_extended.js",
  11. "src/sk_mod_instructor.js",
  12. "src/feedback.js",
  13. "src/printer.js",
  14. "src/engine.js",
  15. ]
  16. js_in = ["src/front.js",
  17. "src/utilities.js",
  18. "src/python_errors.js",
  19. "src/ast_node_visitor.js",
  20. "src/abstract_interpreter.js",
  21. "src/pytifa.js",
  22. "src/abstract_interpreter_definitions.js",
  23. "src/python_to_blockly.js",
  24. "src/treeMatching.js",
  25. "src/sk_mod_instructor_extended.js",
  26. "src/sk_mod_instructor.js",
  27. "src/imported.js",
  28. "src/blockly_blocks/class.js",
  29. "src/blockly_blocks/comment.js",
  30. "src/blockly_blocks/comprehensions.js",
  31. "src/blockly_blocks/dict.js",
  32. "src/blockly_blocks/if.js",
  33. "src/blockly_blocks/io.js",
  34. "src/blockly_blocks/lists.js",
  35. "src/blockly_blocks/sets.js",
  36. "src/blockly_blocks/loops.js",
  37. "src/blockly_blocks/parking.js",
  38. "src/blockly_blocks/tuple.js",
  39. "src/blockly_blocks/turtles.js",
  40. "src/blockly_blocks/text.js",
  41. "src/blockly_blocks/plots.js",
  42. "src/dialog.js",
  43. "src/storage.js",
  44. "src/printer.js",
  45. "src/interface.js",
  46. "src/server.js",
  47. "src/presentation.js",
  48. "src/editor.js",
  49. "src/corgis.js",
  50. "src/history.js",
  51. "src/english.js",
  52. "src/feedback.js",
  53. "src/toolbar.js",
  54. "src/engine.js",
  55. "src/main.js"]
  56. css_in = ['src/blockpy.css']
  57. #js_out = 'kennel_dist/blockpy.js'
  58. #css_out = 'kennel_dist/blockpy.css'
  59. js_out = r'dist/blockpy.js'
  60. nodejs_out = r'dist/blockpy_node.js'
  61. css_out = r'dist/blockpy.css'
  62. for files_in, file_out in [ (js_in, js_out), (css_in, css_out), (nodejs_in, nodejs_out) ]:
  63. with open(file_out, 'w') as outfile:
  64. for fname in files_in:
  65. with open(fname) as infile:
  66. for line in infile:
  67. outfile.write(line)
  68. outfile.write("\n")