Skip to content
Myr

Removed bin/express

Before adoption: this commit came in with the history the project adopted, so no landing records it.

for now :) maybe it will come back some day when it is more useful

authored by visionmedia · committed by visionmedia · parent aef8550 · Browse files · 2 files+0 added−149 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+0 added−149 removed

  • other:+0 added−149 removed

2 files+0 added−149 removed

deleted:bin/express-142 removed
1#!/usr/bin/env bash23#4# Output usage information and exit.5# 67function usage() {8 echo 'usage: express [options] [dir]'9 exit 110}1112#13# Create template in the givin [dir] or cwd.14# 15# [dir]16#1718function create_template() {19 local dir=${1-.}20 mkdir -p $dir21 [[ $(ls $dir) ]] && confirm "$dir is not empty, continue?"22 mkdir -p $dir/public/{javascripts,stylesheets,images}23 mkdir -p $dir/views/partials24 app_template > $dir/app.js25 layout_template > $dir/views/layout.html.haml26 front_template > $dir/views/front.html.haml27 sass_template > $dir/views/style.css.sass28 echo template created in $dir29}3031#32# views/style.css.sass33# 3435function sass_template() {36 cat <<-EOF37blue: #03ADF038light: #4d4d4d39lighter: #eee4041body42 :margin 80px43 :font 14px/1.5 "Helvetica Nueue", "Lucida Grande", "Arial", sans-serif4445code46 :padding 3px 10px47 :border 1px solid !lighter48 :color !light4950a51 :color !blue52 :text-decoration none53 &:hover54 :text-decoration underline55EOF56}5758#59# views/front.html.haml60#6162function front_template() {63 cat <<-EOF64%h1 Express65%p66 Generated by the67 <code>express</code>68 executable.69%p70 Visit71 %a{ href: 'http://expressjs.com' } ExpressJS.com72 for more information. 73EOF74}7576#77# views/layout.html.haml78# 7980function layout_template() {81 cat <<-EOF82!!! strict83%html84 %head85 %title Express86 %link{ rel: 'stylesheet', href: 'style.css' }87 %body!= body88EOF89}9091#92# app.js93# 9495function app_template() {96 cat <<-EOF97// If you are using the kiwi package manager98var kiwi = require('kiwi'),99 express = kiwi.require('express')100101// Otherwise you will need to expose the path to express102// require.paths.unshift('path/to/express/lib')103// require('express')104105configure(function(){106 set('root', __dirname)107})108109get('/', function(){110 this.render('front.html.haml')111})112113get('/*.css', function(path){114 this.render(path + '.css.sass', { layout: false })115})116117run()118EOF119}120121#122# Confirm <msg> or exit.123# 124# <msg>125#126127function confirm() {128 echo -n "$1 "129 read answer130 case $answer in131 n|N|no) exit 1 ;;132 y|Y|yes) ;;133 *) confirm "yes or no?" ;;134 esac135}136137# Process arguments138139case $1 in140 -h|--help|help) usage ;;141 *) create_template $1 ;;142esac
modified:Makefile-7 removed
1 unmodified line
2AB = ab3ABFLAGS = -n 3000 -c 504NODE = node5COFFEE = coffee6PREFIX = /usr/local67all: test8 10install: bin/express11 ln -fs $< $(PREFIX)/bin/express1213uninstall: 14 rm -f $(PREFIX)/bin/express159test:10 @$(NODE) spec/node.js all11 12app: app-chat
27 unmodified lines