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
Provenance
- Commit
0938b57- Tree
453ad23- Author
visionmedia <tj@vision-media.ca>- Committer
visionmedia <tj@vision-media.ca>- Parent
aef8550
2 files changed+0 added−149 removed
deleted:bin/express-142 removed
1-#!/usr/bin/env bash2-3-#4-# Output usage information and exit.5-# 6-7-function usage() {8- echo 'usage: express [options] [dir]'9- exit 110-}11-12-#13-# Create template in the givin [dir] or cwd.14-# 15-# [dir]16-#17-18-function 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-}30-31-#32-# views/style.css.sass33-# 34-35-function sass_template() {36- cat <<-EOF37-blue: #03ADF038-light: #4d4d4d39-lighter: #eee40-41-body42- :margin 80px43- :font 14px/1.5 "Helvetica Nueue", "Lucida Grande", "Arial", sans-serif44-45-code46- :padding 3px 10px47- :border 1px solid !lighter48- :color !light49-50-a51- :color !blue52- :text-decoration none53- &:hover54- :text-decoration underline55-EOF56-}57-58-#59-# views/front.html.haml60-#61-62-function 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. 73-EOF74-}75-76-#77-# views/layout.html.haml78-# 79-80-function layout_template() {81- cat <<-EOF82-!!! strict83-%html84- %head85- %title Express86- %link{ rel: 'stylesheet', href: 'style.css' }87- %body!= body88-EOF89-}90-91-#92-# app.js93-# 94-95-function app_template() {96- cat <<-EOF97-// If you are using the kiwi package manager98-var kiwi = require('kiwi'),99- express = kiwi.require('express')100-101-// Otherwise you will need to expose the path to express102-// require.paths.unshift('path/to/express/lib')103-// require('express')104-105-configure(function(){106- set('root', __dirname)107-})108-109-get('/', function(){110- this.render('front.html.haml')111-})112-113-get('/*.css', function(path){114- this.render(path + '.css.sass', { layout: false })115-})116-117-run()118-EOF119-}120-121-#122-# Confirm <msg> or exit.123-# 124-# <msg>125-#126-127-function 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-}136-137-# Process arguments138-139-case $1 in140- -h|--help|help) usage ;;141- *) create_template $1 ;;142-esacmodified:Makefile-7 removed
1 unmodified line2 AB = ab3 ABFLAGS = -n 3000 -c 504 NODE = node5 COFFEE = coffee6-PREFIX = /usr/local6 7 all: test8 10-install: bin/express11- ln -fs $< $(PREFIX)/bin/express12-13-uninstall: 14- rm -f $(PREFIX)/bin/express15-9 test:10 @$(NODE) spec/node.js all11 12 app: app-chat27 unmodified lines