Update lodash for client side code

This commit is contained in:
Samy Pessé
2015-10-05 10:43:21 +02:00
parent eab3c50288
commit 14bb659b75
3 changed files with 24 additions and 24 deletions
+18 -18
View File
@@ -1,11 +1,11 @@
module.exports = function (grunt) {
var path = require("path");
var path = require('path');
// Load NPM tasks
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks("grunt-bower-install-simple");
grunt.loadNpmTasks('grunt-bower-install-simple');
// Init GRUNT configuraton
grunt.initConfig({
@@ -14,7 +14,7 @@ module.exports = function (grunt) {
options: {
color: true,
production: false,
directory: "theme/vendors"
directory: 'theme/vendors'
}
},
less: {
@@ -25,28 +25,28 @@ module.exports = function (grunt) {
optimization: 2
},
files: {
"theme/assets/style.css": "theme/stylesheets/website.less",
"theme/assets/print.css": "theme/stylesheets/ebook.less"
'theme/assets/style.css': 'theme/stylesheets/website.less',
'theme/assets/print.css': 'theme/stylesheets/ebook.less'
}
}
},
requirejs: {
compile: {
options: {
name: "gitbook",
baseUrl: "theme/javascript/",
out: "theme/assets/app.js",
name: 'gitbook',
baseUrl: 'theme/javascript/',
out: 'theme/assets/app.js',
preserveLicenseComments: false,
optimize: "uglify",
include: ["requireLib"],
optimize: 'uglify',
include: ['requireLib'],
paths: {
"jQuery": '../vendors/jquery/dist/jquery',
"lodash": '../vendors/lodash/dist/lodash',
"requireLib": '../vendors/requirejs/require',
"Mousetrap": '../vendors/mousetrap/mousetrap',
"lunr": '../vendors/lunr.js/lunr',
"URIjs": '../vendors/URIjs/src/',
"ace": '../vendors/ace-builds/src-noconflict/'
'jQuery': '../vendors/jquery/dist/jquery',
'lodash': '../vendors/lodash/lodash',
'requireLib': '../vendors/requirejs/require',
'Mousetrap': '../vendors/mousetrap/mousetrap',
'lunr': '../vendors/lunr.js/lunr',
'URIjs': '../vendors/URIjs/src/',
'ace': '../vendors/ace-builds/src-noconflict/'
},
shim: {
'jQuery': {
@@ -80,7 +80,7 @@ module.exports = function (grunt) {
}
});
grunt.registerTask("bower-install", [ "bower-install-simple" ]);
grunt.registerTask('bower-install', [ 'bower-install-simple' ]);
// Build
grunt.registerTask('build', [
+1 -1
View File
@@ -3,7 +3,7 @@
"version": "1.0.0",
"dependencies": {
"jquery": "2.1.1",
"lodash": "2.4.1",
"lodash": "3.10.1",
"requirejs": "2.1.11",
"URIjs": "1.13.1",
"mousetrap": "1.4.6",
+5 -5
View File
@@ -140,7 +140,7 @@ Configuration.prototype.load = function() {
.then(function() {
if (!that.book.isSubBook()) {
if (!semver.satisfies(pkg.version, that.options.gitbook)) {
throw new Error('GitBook version doesn't satisfy version required by the book: '+that.options.gitbook);
throw new Error('GitBook version doesn\'t satisfy version required by the book: '+that.options.gitbook);
}
if (that.options.gitbook != '*' && !semver.satisfies(semver.inc(pkg.version, 'patch'), that.options.gitbook)) {
that.book.log.warn.ln('gitbook version specified in your book.json might be too strict for future patches, \''+(_.first(pkg.version.split('.'))+'.x.x')+'\' is more adequate');
@@ -230,7 +230,7 @@ Configuration.DEFAULT = {
// Global configuration for plugins
'pluginsConfig': {
'fontSettings': {
'theme': null, //'sepia', 'night' or 'white',
'theme': null, // 'sepia', 'night' or 'white',
'family': 'sans',// 'serif' or 'sans',
'size': 2 // 1 - 4
}
@@ -248,7 +248,7 @@ Configuration.DEFAULT = {
'links': {
// Custom links at top of sidebar
'sidebar': {
//'Custom link name': 'https://customlink.com'
// 'Custom link name': 'https://customlink.com'
},
// Sharing links
@@ -294,10 +294,10 @@ Configuration.DEFAULT = {
'bottom': 56
},
//Header HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
// Header HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
'headerTemplate': '',
//Footer HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
// Footer HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
'footerTemplate': ''
}
};