mole alternatives and similar packages
Based on the "System" category.
Alternatively, view mole alternatives based on common mentions on social networks and blogs.
turtle9.9 5.5 mole VS turtleShell programming, Haskell style
taffybar9.9 4.8 mole VS taffybarA gtk based status bar for tiling window managers such as XMonad
xmobar9.9 8.7 mole VS xmobarA minimalistic status bar
optparse-applicative9.9 4.4 mole VS optparse-applicativeApplicative option parser
bench9.9 0.0 mole VS benchCommand-line benchmark tool
angel9.7 0.0 mole VS angelProcess Monitoring/Management, Like Daemontools
unix9.6 4.8 mole VS unixPOSIX functionality
date-cache9.6 0.0 mole VS date-cacheA fast logging system for Haskell
process9.6 4.8 mole VS processLibrary for dealing with system processes
nix-diff9.5 0.0 mole VS nix-diffExplain why two Nix derivations differ
optparse-generic9.5 0.0 mole VS optparse-genericAuto-generate a command-line parser for your datatype
nix-deploy9.5 0.0 mole VS nix-deployDeploy software or an entire NixOS system configuration to another NixOS system
ghc-hotswap9.5 0.0 mole VS ghc-hotswapExample code for how we swap compiled code within a running Haskell process.
hapistrano9.4 7.1 mole VS hapistranoDeploy tool for Haskell applications, like Capistrano for Rails
envy9.4 0.0 mole VS envy:angry: Environmentally friendly environment variables
filepath9.3 7.8 mole VS filepathHaskell FilePath core library
directory9.3 3.8 mole VS directoryPlatform-independent library for basic file system operations
typed-process9.2 5.4 mole VS typed-processAlternative API for processes, featuring more type safety
pid19.1 0.0 mole VS pid1Do signal handling and orphan reaping for Unix PID1 init processes
log9.0 3.5 mole VS logStructured logging solution.
clock9.0 0.0 mole VS clockHigh-resolution clock functions: monotonic, realtime, cputime.
clifm9.0 0.0 mole VS clifmCommand Line Interface File Manager
hnix-store-core9.0 5.3 mole VS hnix-store-coreHaskell implementation of the nix store API
ekg-core8.9 0.0 mole VS ekg-coreLibrary for tracking system metrics
hail8.9 0.0 mole VS hailA service for pull-based continuous deployment based on hydra.
logsink8.8 0.0 mole VS logsinkA logging framework for Haskell
ekg-cloudwatch8.8 0.0 mole VS ekg-cloudwatchCloudWatch stats for ekg
cef8.8 0.0 mole VS cefA Haskell library for CEF (Commont Event Format)
monky8.8 0.0 mole VS monkyThe main repository for monky
hobbes8.7 0.0 mole VS hobbesA cross-platform file activity monitor
logger8.6 0.0 mole VS loggerFast & extensible logging framework for Haskell!
system-fileio8.6 1.6 mole VS system-fileioContains the system-filepath and system-fileio packages
apotiki8.6 0.0 mole VS apotikia faster debian repository
language-puppet8.5 0.0 mole VS language-puppetA library to work with Puppet manifests, test them and eventually replace everything ruby.
unix-compat8.5 1.0 mole VS unix-compatHaskell portable POSIX-compatibility layer
twitch8.4 0.0 mole VS twitchA high level file watcher DSL
which8.4 0.0 mole VS whichDetermine the full path to an executable.
openssh-github-keys8.4 0.0 mole VS openssh-github-keysControl SSH access to your servers via GitHub teams
ascii-progress8.4 0.0 mole VS ascii-progressA simple Haskell progress bar for the console. Heavily borrows from TJ Holowaychuk's Node.JS project
optparse-declarative8.4 0.0 mole VS optparse-declarativeDeclarative command-line option parser
plugins8.4 1.0 mole VS pluginsDynamic linking and runtime evaluation of Haskell, and C, including dependency chasing and package resolution.
hinotify8.3 0.0 mole VS hinotifyHaskell binding to inotify
ekg-statsd8.3 0.0 mole VS ekg-statsdFlush system metrics to statsd
hen8.2 0.0 mole VS henHaskell bindings to Xen hypervisor interface
directory-contents8.2 0.0 mole VS directory-contentsRecursively build a tree of directory contents, avoiding symlink cycles
lxc8.2 0.0 mole VS lxcHigh level Haskell bindings to LXC (Linux containers).
halfs8.2 0.0 mole VS halfsThe Haskell File System: A file system implementation in Haskell
HFuse8.2 0.0 mole VS HFuseHaskell bindings for the FUSE library
executable-hash8.2 0.0 mole VS executable-hashProvides the SHA1 hash of the program executable
HPi8.0 0.0 mole VS HPiLibrary to access the GPIO pins on a Raspberry Pi from Haskell.
Access the most powerful time series database as a service
Do you think we are missing an alternative of mole or a related project?
A glorified string replacement tool. For a very specific purpose. That purpose being to compile and optimize a static website (or a single-page application). Mole inspects all files, builds a complete dependency tree, minifies and compresses the files, adds fingerprints and writes the result to a directory.
Mole includes a web server to serve the files directly (great during development), and a filesystem watcher which detects changes in source files and recompiles the website (also great during development).
build command to compile the website and write into an output directory. In the following
example all HTML files in the
will be used as entry points and the result will be written into
$ mole --paths public:assets:tmp/js build output/ $ find output/ -type f output/index.html output/BmzSvw4DX-page-WX4ihgSer4F9XRjSGLlfPlDJZEZB.js output/cBqdRpkR4-2-double-bounce-3MLChiQbj6TT6muzK.css output/FJbIHYc2l-icons-NeCQFcz0RY8Q0xL1uG0bZYFO5UY.ttf output/Jsk8sOmoJ-icons-fiGIBQamc3AUCdMQottjO3HrxSA.svg ...
To serve the files instead use the
serve command in place of
server will listen on port 8000. It will also watch files in the source
directories and when they change recompile all dependent files.
$ mole --paths public:assets:tmp/js serve Listening on http://0.0.0.0:8000/ ... 11:09:38 [ index.html ] Rebuilding because assets/index.html was modified
Mole is intentionally limited in what forms of transformation it can do. One file in, one file out. One reference is replaced with one other reference. It can't expand references (e.g. replace one script tag with multiple script tags in a HTML file) or the opposite, compile bundles from multiple files (e.g. replace multiple script tags with a single script tag referencing the compiled bundle). With the adoption of HTML2 bundling becomes largely irrelevant anyways.
There are cases where bundling is useful, but those require more complex
transformation of the source files. For example when using sprites the tool has to
add additional CSS attributes to the selector (
In those cases you are encouraged to use an existing build tool (e.g. sass/compass for sprites).
Building the dependency tree
To build the dependency tree, Mole simulates a web browser. It starts with an
entry point, usually
index.html. The HTML file references other files
(other HTML files through
<a href=X .., images through
<img src=X ...,
CSS files thorough
<link src=X ... etc.). These files in turn reference
yet other files (e.g. CSS files can use
url(x) to refer to images).
So far we've been able infer arbitrary references from the standard HTML
import X from "Y";
to refer to other types of files, for example if you need the URL to an image in your
Many build tools (browserify, webpack) reuse the same
import .. from .. syntax, but then must apply
complex source code transformations to replace the parts with standard
these tools slow.
For these cases Mole supports a different syntax that is completely transparent
wrapped with a function call so that it can be detected by Mole. The function name is chosen
to be unlikely to clash with any existing uses. It's very fast to
detect these fragments in a source file, and that keeps processing time low.
Mole does not remove the function call, you need to define that function somewhere in your project. If you structure your project well, you can make it so that it works with and without mole in the toolchain. That way you really can treat mole purely as an optimization step.
Mole automatically fingerprints all files. Furthermore it applies the following optimizations (checked when implemented, otherwise implementation is either planed or in progress):
- [ ] Strip whitespace
- [ ] Clean up and normalize attributes
- [ ] Strip whitespace
- [ ] Inline small images
- [ ] Prefix attributes for compatibility with older browsers (autoprefixer)
- [ ] Minify/Uglify
- [x] Recompress (kraken.io)
If your source files are not in standard HTML, CSS, JS then you must process them with appropriate tools. Tools like gulp, grunt or even browserify or webpack can be used for that. But note that they don't have to be configured to optimize the output, just to emit standard HTML, CSS and JS.
What's the difference between Mole an webpack?
Webpack is missing one crucial piece, you can't use a HTML file as the entry point! Other than that, webpack is great, I do recommend it as a build tool which produces files which you reference from your HTML files. Then you can process the entry HTML file through Mole to generate or directly serve the site.