diff --git a/.gitignore b/.gitignore index c5d5d1d..9cbd5a5 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ bingkey.txt /.project /keys.js /dist +brouter-web.*.zip diff --git a/README.md b/README.md index fa68f46..29d19e5 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ brouter-web Web client (by [@nrenner](https://github.com/nrenner)) for the BRouter routing engine (by [@abrensch](https://github.com/abrensch)). *Work in progress*. +**New web client available mobile-ready to test on [brouter.damsy.net](http://brouter.damsy.net). +Feedbacks are appreciated, do not hesitate to create issues about it!** + BRouter online service (provided by [@abrensch](https://github.com/abrensch)): http://brouter.de/brouter-web/ @@ -13,7 +16,7 @@ More information: http://brouter.de General BRouter discussions/questions, support: -http://groups.google.com/group/osm-android-bikerouting +https://groups.google.com/group/osm-android-bikerouting ## Installation @@ -72,7 +75,7 @@ This is needed for pre-loading the selected profile (unless you allowed local fi ### Dependencies -Requires [Node and npm](http://nodejs.org/) (or [io.js](https://iojs.org)), [Bower](http://bower.io/) and [Gulp](http://gulpjs.com/): +Requires [Node and npm](https://nodejs.org/) (or [io.js](https://iojs.org)), [Bower](https://bower.io/) and [Gulp](http://gulpjs.com/): npm install -g bower npm install -g gulp @@ -115,12 +118,12 @@ Copyright (c) 2012 [sa3m](https://github.com/sa3m), Copyright (c) 2013 Per Liedm Copyright (c) 2011-2012, Pavel Shramov; [2-clause BSD License](https://github.com/shramov/leaflet-plugins/blob/master/LICENSE) * [Async.js](https://github.com/caolan/async) Copyright (c) 2010-2014 Caolan McMahon; [MIT License](https://github.com/caolan/async/blob/master/LICENSE) -* [Bootstrap](http://getbootstrap.com/) +* [Bootstrap](https://getbootstrap.com/) Copyright (c) 2011-2014 Twitter, Inc; [MIT License](https://github.com/twbs/bootstrap/blob/master/LICENSE) * [jQuery](https://github.com/jquery/jquery) Copyright 2005, 2014 jQuery Foundation and other contributors; [MIT License](https://github.com/jquery/jquery/blob/master/LICENSE.txt) * [DataTables](https://github.com/DataTables/DataTables) -Copyright (C) 2008-2014, SpryMedia Ltd.; [MIT License](http://www.datatables.net/license/mit) +Copyright (C) 2008-2014, SpryMedia Ltd.; [MIT License](https://www.datatables.net/license/MIT-LICENCE) * [Leaflet.EasyButton](https://github.com/CliffCloud/Leaflet.EasyButton) Copyright (C) 2014 Daniel Montague; [MIT License](https://github.com/CliffCloud/Leaflet.EasyButton/blob/master/LICENSE) * [Bootbox](https://github.com/makeusabrew/bootbox) @@ -132,4 +135,4 @@ Copyright (c) 2012 Makina Corpus, [MIT License](https://github.com/makinacorpus/ * [Leaflet.Locate](https://github.com/domoritz/leaflet-locatecontrol) Copyright (c) 2014 Dominik Moritz, [MIT License](https://github.com/domoritz/leaflet-locatecontrol/blob/gh-pages/LICENSE) * [Font Awesome](http://fontawesome.io/license/) -by Dave Gandy; [SIL OFL 1.1](http://scripts.sil.org/OFL) (Font), MIT License (Code), CC BY 3.0 (Documentation) +by Dave Gandy; [SIL OFL 1.1](https://scripts.sil.org/OFL) (Font), MIT License (Code), CC BY 3.0 (Documentation) diff --git a/bower.json b/bower.json index 8e3bda3..d175b07 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "brouter-web", - "version": "0.5.0", + "version": "0.6.3", "main": "dist/**/*", "ignore": [ "**/.*", @@ -38,8 +38,6 @@ }, "leaflet-plugins": { "main": [ - "control/Permalink.js", - "control/Permalink.Layer.js", "layer/tile/Bing.js" ] }, diff --git a/config.js b/config.template.js similarity index 100% rename from config.js rename to config.template.js diff --git a/css/style.css b/css/style.css index b7b7991..5d5911c 100644 --- a/css/style.css +++ b/css/style.css @@ -2,6 +2,14 @@ html, body, #map { height: 100%; } +/* This is important so that bootstrap-select list goes over leaflet buttons +Since the list is in navbar and leaflet buttons within map, we create a +stacking context on their common ancestor */ +body, #content { + position: relative; + z-index: 1; +} + .flexcolumn { display: -webkit-box; display: -moz-box; @@ -88,17 +96,12 @@ footer { cursor: crosshair; } -/* FIXME permalink temporary hack */ -.leaflet-control-permalink { - display: none; -} - #message { position: absolute; left: 446px; /* 400 + 10 + 26 + 10 */ top: 0px; margin-top: 10px; - z-index: 1000; + z-index: 3000; } /* track messages (data tab) */ @@ -107,7 +110,7 @@ footer { } /* dashed line animation, derived from Chris Coyier and others -http://css-tricks.com/svg-line-animation-works/ +https://css-tricks.com/svg-line-animation-works/ */ .loading-trailer { -webkit-animation: dash 0.4s linear infinite; diff --git a/gulpfile.js b/gulpfile.js index 4393a60..7aee969 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -14,6 +14,12 @@ var remember = require('gulp-remember'); var inject = require('gulp-inject'); var gulpif = require('gulp-if'); var gutil = require('gulp-util'); +var zip = require('gulp-zip'); +var bump = require('gulp-bump'); +var semver = require('semver'); +var git = require('gulp-git'); +var replace = require('gulp-replace'); +var release = require('gulp-github-release'); var debug = false; @@ -142,4 +148,90 @@ gulp.task('default', ['clean', 'scripts_config', 'scripts', 'styles', 'images', gulp.task('debug', function() { debug = true; gulp.start('default'); -}); \ No newline at end of file +}); + +var pkg = require('./package.json'); +var tags = {patch: 'patch', minor: 'minor', major: 'major'}; +var nextVersion; +var ghToken; + +gulp.task('release:init', function() { + var tag = gutil.env.tag; + if (!tag) { + gutil.log(gutil.colors.red('--tag is required')); + process.exit(1); + } + if (['major', 'minor', 'patch'].indexOf(tag) < 0) { + gutil.log(gutil.colors.red('--tag must be major, minor or patch')); + process.exit(2); + } + ghToken = gutil.env.token; + if (!ghToken) { + gutil.log(gutil.colors.red('--token is required (github personnal access token)')); + process.exit(3); + } + if (ghToken.length != 40) { + gutil.log(gutil.colors.red('--token length must be 40')); + process.exit(4); + } + git.status({args: '--porcelain', quiet: true}, function(err, stdout) { + if (err) throw err; + if (stdout.length > 0) { + gutil.log(gutil.colors.red('Repository is not clean. Please commit or stash your pending modification')); + process.exit(5); + } + }); + nextVersion = semver.inc(pkg.version, tag); + return; +}); + +gulp.task('bump', ['bump:json', 'bump:html']); + +gulp.task('bump:json', ['release:init'], function() { + gutil.log(gutil.colors.green('Bump to '+nextVersion)); + return(gulp.src(['./package.json', './bower.json']) + .pipe(bump({version: nextVersion})) + .pipe(gulp.dest('./'))); +}); + +gulp.task('bump:html', ['release:init'], function() { + return(gulp.src('./index.html') + .pipe(replace(/(.*)<\/sup>/, ''+nextVersion+'')) + .pipe(gulp.dest('.'))); +}); + +gulp.task('release:commit', ['bump'], function() { + gulp.src(['./index.html', './package.json', './bower.json']) + .pipe(git.commit('release: '+nextVersion)); +}); + +gulp.task('release:tag', ['release:commit'], function() { + return(git.tag(nextVersion, '', function(err) { + if (err) throw err; + })); +}); + +gulp.task('release:push', ['release:tag'], function() { + git.push('origin', 'master', {args: '--tags'}, function(err) { + if (err) throw err; + }); +}); + +gulp.task('release:zip', ['release:tag', 'default'], function() { + gutil.log(gutil.colors.green('Build brouter-web.'+nextVersion+'.zip')); + return(gulp.src(['dist/**', 'index.html', 'config.template.js', 'keys.template.js'], {'base': '.'}) + .pipe(zip('brouter-web.'+nextVersion+'.zip')) + .pipe(gulp.dest('.'))); +}); + +gulp.task('release:publish', ['release:zip'], function() { + gulp.src('./brouter-web.'+nextVersion+'.zip') + .pipe(release({ + tag: nextVersion, + token: ghToken, + manifeste: pkg, + })) +}); + +gulp.task('release', ['release:init', 'bump', 'release:commit', 'release:tag', + 'release:push', 'release:zip', 'release:publish']); \ No newline at end of file diff --git a/index.html b/index.html index 17cd62f..1b97700 100644 --- a/index.html +++ b/index.html @@ -29,9 +29,6 @@ data CSV - -