Permalink
Browse files

updated build system to steve-style

  • Loading branch information...
1 parent 2d95a18 commit 946eaecd33f9fa2e6347d9fe85c24971ac133494 @coolaj86 coolaj86 committed Jun 29, 2012
Showing with 68 additions and 26 deletions.
  1. +41 −0 bin/deploy.sh
  2. +0 −19 browser/deploy.sh
  3. +27 −0 deploy.js
  4. +0 −7 deploy.sh
View
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+#npm install -g jade less pakmanager
+
+pushd server
+ npm install
+popd
+
+#pushd local
+# npm install
+#popd
+
+pushd browser
+ WEBPUB='../public'
+
+ echo -n "Killing off old cruft..."
+ rm -rf "${WEBPUB}"
+
+ echo -n "Copying in static files..."
+ mkdir -p "${WEBPUB}/"
+ rsync -a static/ "${WEBPUB}/"
+ # make sure there's always a favicon, even if it's broken
+ touch "${WEBPUB}/favicon.ico"
+
+ echo -n "Compiling Jade to HTML..."
+ jade *.jade
+ mv *.html "${WEBPUB}/"
+
+ echo -n "Compiling LESS to CSS and minifying..."
+ lessc style.less > style.css
+ mv style.css "${WEBPUB}/"
+
+ echo -n "Compiling JavaScript to CommonJS..."
+ pakmanager build
+ rm pakmanaged.html
+ uglifyjs pakmanaged.js > pakmanaged.min.js
+ mv pakmanaged.* "${WEBPUB}"
+popd
+
+#pushd clients
+#popd
View
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-DEPLOY_DIR='../public'
-
-rm -rf "${DEPLOY_DIR}"
-mkdir -p "${DEPLOY_DIR}"
-
-rsync -a static/ "${DEPLOY_DIR}/"
-
-lessc style.less > style.css
-mv style.css "${DEPLOY_DIR}"
-
-jade index.jade # index.html
-mv index.html "${DEPLOY_DIR}"
-
-pakmanager build
-#uglifyjs pakmanaged.js > pakmanaged.min.js
-mv pakmanaged.js "${DEPLOY_DIR}"
-rm pakmanaged*
View
@@ -0,0 +1,27 @@
+#!/usr/bin/env node
+/*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true*/
+(function () {
+ "use strict";
+
+ var spawn = require('child_process').spawn
+ , util = require('util')
+ , deploy
+ ;
+
+ if (/^win/.exec(process.platform)) {
+ console.log('Windows not supported yet');
+ console.log(process.platform);
+ process.exit(1);
+ }
+
+ deploy = spawn('bash', ['./bin/deploy.sh']);
+ deploy.stdout.on('data', function (data) {
+ util.print(data.toString('utf8'));
+ });
+ deploy.stderr.on('data', function (data) {
+ util.print(data.toString('utf8'));
+ });
+ deploy.on('exit', function (code) {
+ process.exit(code);
+ });
+}());
View
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-
-npm install
-
-pushd browser
-./deploy.sh
-popd

0 comments on commit 946eaec

Please sign in to comment.