dyna3/doc/tech.md

2.3 KiB

Technicalities

Technology plan for implementation

The intial modest outline for bootstrapping dyna3 is as follows:

  • dyna3 will be an npm project, but as it runs entirely client-side, there's no initial concern for being able to run under Node.js. However, npm will be useful as a dependency manager and build tool
  • The package will build into a top-level site/directory, which will contain all and only the files that must be on a server to deliver dyna3 to a client browser. Everything in site/ will generated from the package files; nothing in site/ will be committed to the repository. Right now the planned contents a of site/ are just a handful of top-level files, the modules/ directory for in-package javascript, the /doc directory for generated documentation, and a copy of the node_modules/ directory as a backup for the external dependencies.
  • Literate coffeescript modules (in the src/modules directory except for the top-level application) will compile into individual js modules in the site/modules directory (again, except for the top-level application)
  • The list of external modules will be harvested from npm, automatically generating a site/modules/externals.js from which specific external items can be imported into the local modules. Within externals.js, modules will be imported from the appropriate CDN, with a fallback to a copy in site/node_modules/ for when the CDN is off line.
  • All modules will use ES Modules syntax/format for imports.
  • index.html will be minimal, perhaps containing just a title, and maybe a link to generated documentation in the site/doc directory. All of the modules will create the DOM elements needed to display themselves on the fly.
  • The documentation will be generated by using an m4 master template to collate in the proper order several particular Markdown files, starting with the README and ending with this file, and all of the Literate coffeescript files, into a single site/doc/dyna3.md file. In the process, all of the actual source code of dyna3 will be stripped from the literate coffeescript, leaving just the markdown. The dyna3.md will be further processed into HTML for the site/doc directory.

Specific packages/implementation approaches for components of dyna3 will include:

  • For WebGL rendering of the 3D view of the geometry, the three package from npm.
  • For test harness for the package: QUnit