Permalink
Browse files

productionalizing through npm run-script

  • Loading branch information...
vincentwoo committed Apr 13, 2012
1 parent 1e6ecef commit 5aa5cb89ea2256a575de861c9d792b71e5c00a3c
View
@@ -1,6 +1,6 @@
public/*.js
public/*.css
-public/*.html
-*.gz
+node_modules
*.tmproj
-*.DS_Store
+*.DS_Store
+*.log
View
@@ -5,17 +5,19 @@ This is a multiplayer, realtime implementation of the popular ["Set" card game][
It uses [socket.io][2] to achieve realtime feedback with clients and [jQuery][3] for
various clientside animations.
+After cloning:
+
+ git submodule init
+ git submodule update
+ npm install
+
The server runs in dev mode with:
- ./start
+ npm run-script dev
-npm dependencies are
+or prod (requires sudo for port 80):
- connect
- connect-gzip
- connect-no-www
- socket.io
- ams
+ sudo npm run-script prod
[1]: http://en.wikipedia.org/wiki/Set_(game)
[2]: http://socket.io/
View
@@ -0,0 +1,25 @@
+{
+ "name": "setgame",
+ "version": "0.2.0",
+ "author": "Vincent Woo <me@vincentwoo.com>",
+ "description": "Real-time multiplayer set in the browser",
+ "private": true,
+ "scripts": {
+ "dev": "./start_dev",
+ "prod": "./start_prod"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://vincentwoo@github.com/vincentwoo/setgame.git"
+ },
+ "dependencies" : {
+ "ams" : "0.0.x",
+ "connect" : "1.0.x",
+ "connect-no-www" : "0.1.x",
+ "gzippo" : "0.1.x",
+ "socket.io" : "0.9.x",
+ "supervisor" : "0.3.x"
+ },
+ "engine": "node = 0.6.x",
+ "license": "MIT"
+}
View
File renamed without changes.
File renamed without changes.
View
File renamed without changes.
File renamed without changes.
View
@@ -127,10 +127,7 @@ function buildStaticFiles() {
uglifyjs: prod,
jstransport: false,
cssabspath: false,
- csshost: false,
cssdataimg: false,
- htmlabspath: false,
- htmlhost: false,
texttransport: false
};
ams.build
@@ -146,10 +143,6 @@ function buildStaticFiles() {
.end();
ams.build
.create(publicDir)
- .add(clientDir + '/index.html')
- .add(clientDir + '/game.html')
- .add(clientDir + '/about.html')
- .add(clientDir + '/help.html')
.add(clientDir + '/style.css')
.add(depsDir + '/headjs/src/load.js')
.process(options)
View
File renamed without changes.
View
@@ -0,0 +1,3 @@
+#!/bin/sh
+export NODE_ENV="production"
+supervisor server.js

0 comments on commit 5aa5cb8

Please sign in to comment.