@@ -10,6 +10,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
Nothing yet.
## [1.1.0] - 2019-03-03
### Changed
- Simplified the readme.
## [1.0.1] - 2019-03-03
### Fixed
- Updated the example in the readme.
## [1.0.0] - 2019-03-03
Initial release (forked from [Bankai](https://github.com/choojs/bankai)). This is a simplified version of Bankai, tuned specifically for the needs of the Hypha project.
If you want a general purpose web compiler, please use Bankai and [back their project](https://opencollective.com/choo).
@hypha/web-compiler is a simplified version of Bankai, tuned for the needs of the Hypha project that uses [https-server](https://source.ind.ie/hypha/tools/https-server) for seamless installation and use of locally-trusted certificates during development (and, soon, seamless Let’s Encrypt certificate provisioning and use in production).
@hypha/web-compiler is a simplified version of Bankai, tuned specifically for the needs of the Hypha project. For a summary of the differences,[please see the change log](https://source.ind.ie/hypha/tools/web-compiler/blob/master/CHANGELOG.md#100-2019-03-03).
## Installation
...
...
@@ -16,19 +16,11 @@ npm i @hypha/web-compiler
## Usage
The primary use case of web-compiler is programmatically with Hypha.
In Hypha, web-compiler is used:
@hypha/web-compiler is used programmatically<sup>[1](#footnote1)</sup> within Hypha:
1. As a live build and reload tool on development.
2. As a build and optimisation tool on production.
There is a command-line binary but it is not used in Hypha except for its _inspect_ command:
```sh
web-compiler inspect
```
## Example
@hypha/web-compiler is used by hooking it up to an HTTPS server like [@hypha/https-server](https://source.ind.ie/hypha/tools/https-server).
...
...
@@ -140,193 +132,10 @@ server.listen(443, () => {
})
```
## Reference, other details, etc.
## Optimisations
The following optimisations are applied during a build:
### JavaScript
- __[nanohtml][]:__ Optimize `choo` HTML code so it runs significantly faster in the
browser.
- __[glslify][]:__ Adds a module system to GLSL shaders.
- __[brfs][]:__ Statically inline calls to `fs.readFile()`. Useful to ship assets
in the browser.
- __[envify][]:__ Allow environment variables to be used in the bundle. Especially
useful in combination with minification, which removes unused code paths.
- __[split-require][]:__ Lazy load parts of your application using the
For further information, [please see the pre-fork Bankai documentation](https://source.ind.ie/hypha/tools/web-compiler/blob/6e7b439ee7f3840b4ee275bf0a8787d2fbcf2482/README.md).
<aname='footnote1'>1</a>: There is a command-line binary but, while it is functional, it is not used in Hypha except to gaze upon the beautiful output of the _inspect_ command, which visualises project/component sizes in the browser: