Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Repository for twolfson.com
CSS JavaScript HTML Other

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
articles
bin
config
dist
docs
grunt
public
server
test
.gitignore
.jscsrc
.jshintrc
.nodemonignore
.travis.yml
CHANGELOG.md
Gruntfile.js
LICENSE-MIT
README.md
Vagrantfile
package.json

README.md

twolfson.com Build status

Repository for http://twolfson.com/

This server is written on top of express, for routing and views, and jojo, for blog entries.

We use inuit.css as our CSS framework to provide OOCSS and BEM conventions.

Getting started

The following steps will get a server running locally:

# Clone the repository
git clone https://github.com/twolfson/twolfson.com
cd twolfson.com

# Install dependencies
npm install

# Run the server
npm start # should say 'Server running at http://localhost:8080/'
# For continuous development, use `nodemon`
# nodemon -x bin/twolfson.com

The server should be accessible via your browser at http://localhost:8080/

Documentation

Development

CSS

CSS is compiled via SASS. We depend on ruby-sass@3.3.4 (requires gem to be installed).

gem install sass -v 3.3.4

CSS compilation is run by default as part of the main grunt task but can be run standalone:

grunt # Compiles and watches CSS for changes
grunt css # Compile CSS once

Images

Images are compiled into spritesheets via grunt-spritesmith. These are run via a standalone grunt task:

grunt sprite

JS

External JS libraries are managed via grunt-curl and grunt-zip. See Low tech dependency management via grunt tasks.

As with CSS these are run by default as part of the main grunt task but can be run standalone:

grunt # Compiles and watches JS for changes
grunt js # Compile JS once

Code organization

Folders

  • articles/ - GitHub Flavored Markdown files for blog posts
  • bin/twolfson.com - Executable to start twolfson.com locally
  • config/ - Per-environment configuations
  • dist/ - Minified public files
  • server/ - Container for majority of app
    • index.js - Constructor for server that binds view and routing middlewares
    • controllers/ - Business logic for server endpoints
    • models/ - External data for the server to read in
    • routes.js - Attachements for controllers/ to URLs
    • views/ - HTML templates written in Jade
  • public/ - CSS, images, and JavaScript for client side pages
  • test/ - Container for various test types
    • integrations-tests/ - BDD tests written in mocha that test server behavior
    • perceptual-tests/ - Perceptual diffs that detect visual changes across pages
    • production-tests/ - BDD tests written in Mocha for [twolfson.com][twolfson.com]
    • utils/ - Common utilities used for starting up/tearing down servers and making HTTP requests

Files

  • CHANGELOG.md - Record of changes that have happened on the server
  • README.md - Documentation for the project
  • Gruntfile.js - A grunt implementation for linting and minification.

Donating

Support this project and others by twolfson via gratipay.

Support via Gratipay

License

Copyright (c) 2013-2014 Todd Wolfson

Licensed under the MIT license.

Something went wrong with that request. Please try again.