Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FIXED - Properly bundles rocket reps inside client-build

  • Loading branch information...
commit a39fce680f928f9f45be83a5b4d4864a66f17bb8 1 parent 5363429
@glesperance authored
Showing with 17 additions and 11 deletions.
  1. +15 −10 lib/client/client.js
  2. +2 −1  package.json
View
25 lib/client/client.js
@@ -12,6 +12,7 @@ var async = require('async')
, requirejs = require('../vendors/r')
, rimraf = require('rimraf')
+ , wrench = require('wrench')
, util = require('util')
;
@@ -542,12 +543,6 @@ exports.setup = function setup_client() {
*/
app.use('/static', express.static(static_dir_path));
- /***
- * sets up a static middleware to serve the rocket `rocket-js` folder
- * as `/rocket-js`
- */
- app.use('/js/rocket', express.static(path.join(__dirname, 'rocket-js')));
-
function doneCallback() {
if (middlewares) {
for (var i = 0, ii = middlewares.length; i < ii; i++) {
@@ -639,7 +634,14 @@ exports.setup = function setup_client() {
, function (callback) {
async.parallel(
- [ function (callback) {
+ [ function (callback) {
+ wrench.copyDirRecursive(
+ path.join(__dirname, 'rocket-js')
+ , path.join(client_build_js_dir_path, 'rocket')
+ , callback);
+ }
+
+ , function (callback) {
async.waterfall(
[ function (callback) {
if (buildClient)
@@ -706,6 +708,12 @@ exports.setup = function setup_client() {
} else {
+ /***
+ * sets up a static middleware to serve the rocket `rocket-js` folder
+ * as `/rocket-js`
+ */
+ app.use('/js/rocket', express.static(path.join(__dirname, 'rocket-js')));
+
//sets up a static middleware to serve the webapp `client/js` folder
//as `/js`
app.use('/js', express.static(js_dir_path));
@@ -719,7 +727,4 @@ exports.setup = function setup_client() {
], doneCallback);
}
-
-
-
}
View
3  package.json
@@ -2,7 +2,7 @@
"name": "rocket"
, "description": "The rapid development framework for node.js"
, "keywords": ["mvc", "model view controller", "comet","rapid development", "Rocket", "framework"]
-, "version": "0.5.2"
+, "version": "0.5.3"
, "homepage": "http://wavo.me"
, "repository":
{ "type" : "git"
@@ -29,6 +29,7 @@
, "now" : "0.8.x"
, "colors" : "0.6.x"
, "requirejs" : "2.0.x"
+ , "wrench" : "1.3.x"
}
, "devDependencies": {
}
Please sign in to comment.
Something went wrong with that request. Please try again.