Skip to content

Commit

Permalink
Update server command for Superstatic 0.11.0. Closes #95
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Corgan committed Jun 4, 2014
1 parent 922ffaa commit b4996f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions lib/commands/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,8 @@ module.exports = function (cli) {

command.description('start server for local development');
command.handler(function (customDir, done) {
var childProcessArgs = [];
var port = cli.args.args.p || cli.args.args.port;
var host = cli.args.args.host;

if (customDir && typeof customDir !== 'object') childProcessArgs.unshift(customDir);
if (port) childProcessArgs = childProcessArgs.concat('-p', port);
if (host) childProcessArgs = childProcessArgs.concat('-h', host);
if (host) childProcessArgs = childProcessArgs.concat('--logging');

var cmd = path.resolve(__dirname, '../../node_modules/.bin/superstatic');
var server = spawn(cmd , childProcessArgs);
var server = spawn(cmd , process.argv.splice(3));

server.stdout.on('data', function (data) {
cli.log(data.toString());
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"request": "2.36.x",
"semver": "2.3.x",
"sizer": "0.1.x",
"superstatic": "~0.10.1",
"superstatic": "~0.11.0",
"tarzan": "0.1.x",
"through": "~2.3.4",
"update-notifier": "~0.1.8",
Expand Down

0 comments on commit b4996f3

Please sign in to comment.