Skip to content

Build system requirements #40

@richard-jones

Description

@richard-jones

These are my requirements for any kind of build system we introduce:

  1. It must not add any significant complexity or overhead effort to development. Ideally it would reduce effort.
  2. Must support the ability to produce a build for a client (or other users) which includes only the parts of the code required, with their additional code changes also bundled. We would want a "global" build for the library, and then the ability to easily produce builds which are for specific purposes. There may be more than one "build" for the code in a single project.
  3. Must produce code which is functionally identical to what the developer wrote. It should not be necessary to modify working code to get the build system to produce working code.
  4. Must allow us to have one or more global namespaces declared. That is, at least edges and es but also to allow clients to have global namespaces (e.g. doaj). It should not wrap the resulting built code in an IIFE, or if it does, the IIFE should produce a code module which is mounted on a global namespace, and reflects the structure of the written code.
  5. Must be supported in the developer IDE (at least JetBrains)
  6. Must work well with SCSS/SASS/CSS or ignore it completely and let that be a separate concern
  7. The resulting code must inspect well in the browser. Objects should appear named as they appear in the source, and it should be trivial to map from the line of the source in the browser to the source file in the IDE. It should be possible to add breakpoints in the code as if it is the code in the IDE, and to debug line by line as if in the IDE.
  8. It must be able to handle swappable dependencies. For example, the ES library or the jquery library may need to be swapped for alternative versions either at run-time or build-time. That is import es should be able to accept that es may be one of a selection of possible libraries
  9. It must be capable of producing multiple outputs. For example, if a client has a search page and a data viz page, this should be able to produce two (or more) packages which provide the specific functionality for each page, without bundling additional unrequired code. It may also be desireable to produce 3 outputs in this case: a common library, and then 2 page-specific libraries.
  10. It must support the new style node import syntax, and also accept the old style by-reference function calls. That is import es as per node, or simply a call to es.doQuery where es will be satisfied at run time in the browser.
  11. Similar to 10, it must support libraries which are explicitly always externally referenced. For example, the google maps code retrieved with an API key at run-time.
  12. Transcoding to support older versions of the js runtime would be desireable.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions