es6-minifier
Version, currently 0.1.35 versions
github.com/sam0x17/es6-minifier
A self-contained crystal shard that can minify ES6+ JavaScript.
Nothing has been indexed for 0.1.3 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
es6-minifier:
github: sam0x17/es6-minifier
version: ~> 0.1.3Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.3. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
es6-minifier
Embeds Terser (current standard es6 minification tool in the NPM ecosystem) in a crystal shard via a cross-platform pkg-powered binary that embeds Terser in a lightweight portable nodejs environment. No nodejs required.
Usage
Just install the shard and you can minify your ES6+ Javascript as follows:
require "es6-minifier"
Es6Minifier.minify!("const something = 3;") # => "const something=3;"
Es6Minifier.minify!(["file1.js", "file2.js"])
# file1.js and file2.js are overwritten with a minified version of their contents
If a parsing or IO error occurs, Es6Minifier.minify! will throw an error.
Right now there are no configurable options however this could be easily
added by passing JSON options to minify.js and adding a bit of code
on the crystal side. Pull requests welcome!
Currently supports linux, macos, and alpine. Could easily support FreeBSD and Windows with a several line change.
Installation
Just add the following to yoour shard.yml:
dependencies:
es6-minifier:
github: sam0x17/es6-minifier
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.3- Tagged
- Jul 21, 2022
- Commit
42358a81b8dd- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/sam0x17/es6-minifier
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 5