1.0.0 • Published 3 years ago

@glacier/core v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

codecov Continues Integration Maintainability Known Vulnerabilities npm npm

Installation

npm install --save-dev @glacier/core

Architecture

This section describes the general architecture. Glacier is build to be easily extendable to support as many use cases as possible while being easily understandable. The following entities are the foundation of the Glacier core.

GlacierModule

Any import is resolved to a GlacierModule. It can be either an existing file on a disk or a virtual one generated by a GlacierTransformer.

GlacierReference

Each GlacierModule can have n references to other modules. The relation between two modules is describes as a GlacierReference

GlacierResolver

Each ModuleType can have a custom resolver that handles the detection of references between GlacierModule. It parses the module and creates n GlacierReference.

GlacierLookup

For each GlacierReference, the lookup function will be called to transform it into a GlacierModule. Either the source path or the destination path of the GlacierReference can be used to decide which lookup function should be used.

GlacierTransformer

All GlacierModule can be processed by n GlacierTransformer. After all transformer has been called, the GlacierModule must have the content of a pure JavaScript, CSS, HTML or Asset.

GlacierBundler

Each ModuleType will go through a single GlacierBundler which will create a list of GlacierChunk.

GlacierChunk

ModuleType