Skip to content

Source Program from the Textbook

XinYue edited this page Apr 18, 2020 · 1 revision

Requirements

  • node.js

Overview

  • This program generates all the Source (aka JavaScript) code included in the SICP.JS textbook.
  • The generated folder follows the /xml folder structure. Each Source program is stored in a separate .js file.
  • The Source programs are generated by searching through executable <SNIPPET> tags in all xml files. The programs included their respective REQUIRES and EXAMPLE, and thus can be run directly using "Source Academy playground".

Set up

Run npm install to install dependencies.

Deployment

Run make js/ npm start js

The generated Source programs are saved in js_programs folder.

Development

The entire program is located at nodejs. To test any changes made to the nodejs project, cd js_programs && http-server to view the textbook on a local server.

Clone this wiki locally