Front end compiler
A simple, unopinionated asset pipline / static site generator / whatever.
I use it for my blog.
- Compiles LESS/HAMLC/CoffeeScript/Markdown into a static site
- Built with Browserify/Coffeeify/Debowerify
$ = require('jquery')(really)
- Site structure is available to all templates during rendering
- Build-Your-Own article index, post listing, etc
- Can deploy to GitHub pages (docs soon)
My favorite tools for making web sites are Markdown, CoffeeScript, HAML, and LESS. For the most part, I just want all the things compiled and spit out into a folder I can serve statically. This does that, and just that. If you need more, you're a programmer, and this tool will support you without getting in your way.
Convention or configuration? I like a healthy combination of sensible defaults and flexible configuration options.
npm install -g fec bower
bower install --save jquery bootstrap font-awesome
Then create some files:
$ = require 'jquery'$ ->consolelog 'The DOM is loaded!'
!!! 5%html%head%title= @page.title...
---title: Amazing Siteslug: index---Some *markdown* content.
And run the tool
You'll see the output in
fec dev to recompile on changes, and start a static webserver.
The tool accepts some options. Run
fec help to see the defaults.
require('package-installed-with-bower')from your front-end code. If you have your
bower_componentssomewhere non-standard (i.e. not
project-root/bower_components) specify it here.
--srcDir, -sThe directory your front-end source (coffee/less/md) lives
--buildDir, -bThe directory your compiled, static site lives
--tmpDirA temporary directory for compilation artifacts, safe to delete at any time
--mainScript, -mThe name of your main coffeescript file
--mainTemplateThe name of your main template (hamlc) file
--compressTrue to uglify/compress your js/css output
--verbose, -vEnable debugging output. Specify more v's for more output.
--quiet, -qDisable all output
.fe file in your project root to override the default for any option. We'll
auto detect the format of your file (json, yaml, and dotfile format are supported).
Be sure to use camelCased, long-option-form of the options. Run
fec help to
see your settings; it will reflect the settings from your