Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Boilerplate for Node

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .sass-cache
Octocat-spinner-32 app
Octocat-spinner-32 assets
Octocat-spinner-32 bin
Octocat-spinner-32 public
Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .bowerrc
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 Gruntfile.coffee
Octocat-spinner-32 README
Octocat-spinner-32 component.json
Octocat-spinner-32 config.rb
Octocat-spinner-32 package.json
Octocat-spinner-32 server.js
README
Boiler Node
===========

This is a boilerplate for a node.js application using the MVC file structure.

Mocha
Jade
Stylus
Hiredis
Socket io
Redis
Node-dev

\--app (Node Server Javascript)
|  \--controllers
|  \--models
|  \--views
|  \--helpers
|  \--socket-io.coffee
|
\--assets (Client-side pre-compilation assets)
|  \--javascripts (Client-side coffeescript)
|  |  \--coffeescripts
|  \--stylesheets (SASS, STYLUS, LESS stylesheets)
|
\--dist (Minified files for distribution)
|  \--stylesheets
|  \--javascripts
|  \--images
|
\--bin (Scripts to run -- possibly replace with gruntfile)
|  \--devserver
|  \--test
|  \--watch
|
\--src (Server-side pre-compilation assets)
|  \--build
|     \--app.build.js
|     \--build.sh*
|
\--public (Post compiled scripts)
|  \--stylesheets
|  \--javascripts
|  |  \--vendor (bower directory. .bowerrc = "directory": "assets/javascripts/vendor")
|  \--images
|
\--test
|  \--apps
|  \--models
|  \--_helper.js
|
\--views
|
\--app.js
\--package.json
\--grunt.js

======================================================
COMPASS
======================================================

Create a Gemfile
----------------

$ touch Gemfile

$ gem install bundler (http://gembundler.com)

Specify Gemfile's dependencies:

source "https://rubygems.org"

gem 'compass'
gem 'sass'
gem 'compass_twitter_bootstrap'
gem 'susy'


$ bundle install
$ git add Gemfile Gemfile.lock


Create a config.rb
------------------

# Compass CSS framework config file

require 'susy'
require 'compass_twitter_bootstrap'
# Require any additional plugins here.

project_type = :stand_alone
# Set this to the root of your project when deployed:
http_path = "/"
sass_dir ="assets/stylesheets"
css_dir = "public/stylesheets"
images_dir = "public/images"
fonts_dir = "public/fonts"
javascripts_dir = "public/javascripts"
line_comments = false
preferred_syntax = :sass
output_style = :expanded
relative_assets = true




$ compass create


SCSS to SASS Conversion tip
To easily convert .scss files to .sass files you can use this little bash script:

$ for f in *.scss; do sass-convert -F scss -T sass $f ${f%%.*}.sass; done

To convert all twitter bootstrap .scss files to .sass (with overwrite):

$ for f in stylesheets/compass_twitter_bootstrap/*.scss; do sass-convert -F scss -T sass $f stylesheets_sass/compass_twitter_bootstrap/${f%%.*}.sass; done

$ for f in stylesheets/*.scss; do sass-convert -F scss -T sass $f stylesheets_sass/${f%%.*}.sass; done

Nice and easy :)

===========================================================

===========================================================


Something went wrong with that request. Please try again.