Skip to content
This repository was archived by the owner on Dec 3, 2018. It is now read-only.

Commit

Permalink
merge latest mb-pages + bump node-gdal
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Nov 11, 2015
2 parents 143e9fc + cd294ea commit 81992b7
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Mapbox Studio Classic
Desktop application for vector tile driven map design.

[![Build Status](https://secure.travis-ci.org/mapbox/mapbox-studio-classic.svg)](http://travis-ci.org/mapbox/mapbox-studio-classic)
[![Build status](https://ci.appveyor.com/api/projects/status/28kreaivb6nv6ju2?svg=true)](https://ci.appveyor.com/project/Mapbox/mapbox-studio)
[![Dependencies](https://david-dm.org/mapbox/mapbox-studio.svg)](https://david-dm.org/mapbox/mapbox-studio)
[![Build status](https://ci.appveyor.com/api/projects/status/vmvkol2diegfo7gc?svg=true)](https://ci.appveyor.com/project/Mapbox/mapbox-studio-classic)
[![Dependencies](https://david-dm.org/mapbox/mapbox-studio-classic.svg)](https://david-dm.org/mapbox/mapbox-studio-classic)

### Install latest release

Expand Down
2 changes: 1 addition & 1 deletion _config.mb-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ defaults:
date: 0000-01-01

### latest release
release: v0.3.2
release: v0.3.3
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ defaults:
date: 0000-01-01

### latest release
release: v0.3.2
release: v0.3.3
10 changes: 7 additions & 3 deletions index-shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,15 @@ var shellLog = path.join(process.env.HOME, '.mapbox-studio', 'shell.log');
// set up shell.log and log rotation
log(shellLog, 10e6, shellsetup);

function shellsetup(err){

function shellsetup(err) {
if(err) {
console.log('shellsetup:', err);
exit();
return;
}
// Start the server child process.
server = spawn(node, [script, '--shell=true'])
.on('error', function(error){
.on('error', function(error) {
process.stdout.write('error spawning server process: ' + error + '\n');
})
.on('exit', exit);
Expand Down
17 changes: 15 additions & 2 deletions lib/log.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var fs = require('fs');
var path = require('path');
var through = require('through');
var rotate = require('log-rotate');

Expand All @@ -21,13 +22,25 @@ module.exports = function(filepath, maxsize, callback) {


function setup(offset) {
var dir = path.dirname(filepath);
if(!fs.existsSync(dir)) {
try{
fs.mkdirSync(dir);
}
catch(err) {
var msg = 'Problem writing to logfile at ' + filepath;
//console.warn(msg);
return callback(msg);
}
}
var logstream = fs.createWriteStream(filepath, {
flags: offset ? 'r+' : 'w',
start: offset
});
logstream.on('error', function (err) {
console.warn('Problem writing to logfile at ' + filepath);
return callback();
var msg = 'Problem writing to logfile at ' + filepath;
//console.warn(msg);
return callback(msg);
})
var pipeout = through();
var pipeerr = through();
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mapbox-studio",
"version": "0.3.2",
"version": "0.3.3",
"main": "./index",
"author": "Mapbox (https://www.mapbox.com)",
"engines": {
Expand Down Expand Up @@ -39,7 +39,7 @@
"tilelive-bridge": "~2.2.1",
"tilelive-vector": "~3.5.0",
"mapnik-omnivore": "~6.3.2",
"gdal": "0.7.0",
"gdal": "~0.7.2",
"abaculus": "1.2.1",
"mapbox-machine-styles": "2.3.1",
"mapbox-studio-pro-fonts": "https://mapbox-npm.s3.amazonaws.com/package/mapbox-studio-pro-fonts-1.0.0-9870a90b713f307b9391829602f4d5857e419615.tgz",
Expand Down

0 comments on commit 81992b7

Please sign in to comment.