0.0.87 • Published 4 years ago

fec v0.0.87

Weekly downloads
265
License
-
Repository
-
Last release
4 years ago

A simple, unopinionated asset pipline / static site generator / whatever.

I use it for my blog.

Features
  • Compiles (LESS|SASS)/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)
Philosophy

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.

Quick Start

  • npm install -g fec bower
  • mkdir project-folder
  • cd project-folder
  • fec new
  • fec dev
    • watches the created directory for changes and recompiles
    • runs a webserver

Browse to <localhost:8080> to see the default site. Hack away.

Anatomy of the created directory

The tool works on directories of scripts, styles, templates, and markdown files. You may create any directory structure you'd like; but css, js, images, and fonts are reserved by the system.

  • Scripts are written in javascript or coffeescript.
    • Only the mainScript is compiled (fe.coffee by default). Anything you want in the compiled JS must be required from this file. (This behavior may will be changing soon.)
    • You can require anything you install with npm or bower, or local scripts
  • Styles are written in less (default) or sass
    • All of your stylesheets are concatenated and processed. You are responsible for handling load order.
  • Templates are HAML/Coffeescript templates. The template's context (this) is extended with some useful properties:
    • @page - this page's metadata
    • @page.html - this page's rendered content
    • @site - the other pages' metadata
    • @JST - all the templates, as javascript functions
  • Markdown is where the static content lives
    • They are compiled into html pages in the buildDir
    • They are configurable with YAML front-matter
      • title: the page's title
      • slug: the filename of the compiled file (defaults to slugified title)
      • template: a template to wrap the content (optional; output will still be rendered by the main template)
      • Your own data! It's all available at compile-time to your templates

Configuring

The tool accepts some options. Run fec help to see the defaults.

  • --bowerDir You can require('package-installed-with-bower') from your front-end code. If you have your bower_components somewhere non-standard (i.e. not project-root/bower_components) specify it here.
  • --srcDir, -s The directory your front-end source (coffee/less/md) lives
  • --buildDir, -b The directory your compiled, static site lives
  • --tmpDir A temporary directory for compilation artifacts, safe to delete at any time
  • --mainScript, -m The name of your main coffeescript file
  • --mainTemplate The name of your main template (hamlc) file
  • --mainStylesheet The name of your main stylesheet file
  • --cssPreprocessor The preprocessor you'd like to use. Currently supported: less, sass
  • --compress True to uglify/compress your js/css output
  • --verbose, -v Enable debugging output. Specify more v's for more output.
  • --quiet, -q Disable all output

dotfe file

Put a .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 .fe file.

0.0.86

4 years ago

0.0.87

4 years ago

0.0.84

4 years ago

0.0.85

4 years ago

0.0.80

4 years ago

0.0.81

4 years ago

0.0.82

4 years ago

0.0.83

4 years ago

0.0.73

4 years ago

0.0.74

4 years ago

0.0.75

4 years ago

0.0.76

4 years ago

0.0.77

4 years ago

0.0.78

4 years ago

0.0.79

4 years ago

0.0.70

4 years ago

0.0.71

4 years ago

0.0.72

4 years ago

0.0.62

4 years ago

0.0.63

4 years ago

0.0.64

4 years ago

0.0.65

4 years ago

0.0.66

4 years ago

0.0.67

4 years ago

0.0.68

4 years ago

0.0.69

4 years ago

0.0.60

4 years ago

0.0.61

4 years ago

0.0.59

4 years ago

0.0.57

4 years ago

0.0.58

4 years ago

0.0.56

4 years ago

0.0.55

4 years ago

0.0.54

4 years ago

0.0.53

4 years ago

0.0.51

4 years ago

0.0.52

4 years ago

0.0.50

4 years ago

0.0.49

4 years ago

0.0.47

4 years ago

0.0.48

4 years ago

0.0.46

4 years ago

0.0.43

4 years ago

0.0.44

4 years ago

0.0.45

4 years ago

0.0.42

4 years ago

0.0.41

4 years ago

0.0.40

4 years ago

0.0.39

4 years ago

0.0.37

4 years ago

0.0.38

4 years ago

0.0.36

4 years ago

0.0.34

4 years ago

0.0.35

4 years ago

0.0.33

4 years ago

0.0.32

4 years ago

0.0.31

4 years ago

0.0.30

4 years ago

0.0.29

4 years ago

0.0.28

4 years ago

0.0.27

4 years ago

0.0.25

4 years ago

0.0.26

4 years ago

0.0.23

4 years ago

0.0.24

4 years ago

0.0.21

4 years ago

0.0.22

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.14

4 years ago

0.0.15

4 years ago

0.0.16

4 years ago

0.0.13

4 years ago

0.0.11

4 years ago

0.0.12

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

7 years ago

0.0.3

8 years ago

0.0.2

10 years ago

0.0.1

10 years ago