Compare commits

...

2 Commits

Author SHA1 Message Date
Samy Pessé a836bdedb4 Bump version to 2.0.0-beta.5 2015-03-17 11:23:35 +01:00
Samy Pessé 15ebae8cb1 Fix #641: fix progress order in json format 2015-03-17 11:22:56 +01:00
4 changed files with 13 additions and 1 deletions
+3
View File
@@ -2,6 +2,9 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## 2.0.0-beta.5
- Fix progress order in json format
## 2.0.0-beta.4
- Fix default generator for use programmatically
- Add option "author" for html meta tags
+1
View File
@@ -57,6 +57,7 @@ function navigation(summary, files) {
return [current.path, {
index: i,
title: current.title,
prev: prev,
next: next,
+8
View File
@@ -7,10 +7,18 @@ var calculProgress = function(navigation, current) {
var done = true;
var chapters = _.chain(navigation)
// Transform as array
.map(function(nav, path) {
nav.path = path;
return nav;
})
// Sort entries
.sortBy(function(nav) {
return nav.index;
})
.map(function(nav, i) {
// Calcul percent
nav.percent = (i * 100) / Math.max((n - 1), 1);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "gitbook",
"version": "2.0.0-beta.4",
"version": "2.0.0-beta.5",
"homepage": "https://www.gitbook.com",
"description": "Library and cmd utility to generate GitBooks",
"main": "lib/index.js",