Fixed #126: lack of a semi colon at end of the bundled files

This commit is contained in:
jos 2014-08-28 21:20:14 +02:00
parent b0a1795c12
commit 14db0632c2
7 changed files with 45 additions and 45 deletions

View File

@ -3,10 +3,11 @@
https://github.com/josdejong/jsoneditor https://github.com/josdejong/jsoneditor
## 2014-08-01, version 3.1.2 ## not yet released, version 3.1.2
- Some fixes/improvements in `parseJS` (to parse a JSON object from a JavaScript - Some fixes/improvements in `parseJS` (to parse a JSON object from a JavaScript
object). object).
- Fixed the lack of a semi colon at end of the bundled files.
## 2014-08-01, version 3.1.1 ## 2014-08-01, version 3.1.1

View File

@ -1,6 +1,6 @@
{ {
"name": "jsoneditor", "name": "jsoneditor",
"version": "3.2.0-SNAPSHOT", "version": "3.1.2-SNAPSHOT",
"description": "A web-based tool to view, edit and format JSON", "description": "A web-based tool to view, edit and format JSON",
"tags": [ "tags": [
"json", "json",

View File

@ -105,7 +105,7 @@ gulp.task('bundle', function (done) {
gulp.task('minify', ['bundle'], function () { gulp.task('minify', ['bundle'], function () {
var result = uglify.minify([JSONEDITOR_JS], uglifyConfig); var result = uglify.minify([JSONEDITOR_JS], uglifyConfig);
fs.writeFileSync(JSONEDITOR_MIN_JS, result.code + '\n//# sourceMappingURL=' + FILE_MAP); fs.writeFileSync(JSONEDITOR_MIN_JS, result.code);
fs.writeFileSync(JSONEDITOR_MAP_JS, result.map); fs.writeFileSync(JSONEDITOR_MAP_JS, result.map);
gutil.log('Minified ' + JSONEDITOR_MIN_JS); gutil.log('Minified ' + JSONEDITOR_MIN_JS);

View File

@ -23,8 +23,8 @@
* Copyright (c) 2011-2014 Jos de Jong, http://jsoneditoronline.org * Copyright (c) 2011-2014 Jos de Jong, http://jsoneditoronline.org
* *
* @author Jos de Jong, <wjosdejong@gmail.com> * @author Jos de Jong, <wjosdejong@gmail.com>
* @version 3.1.1 * @version 3.1.2-SNAPSHOT
* @date 2014-08-01 * @date 2014-08-28
*/ */
(function webpackUniversalModuleDefinition(root, factory) { (function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object') if(typeof exports === 'object' && typeof module === 'object')
@ -82,7 +82,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* 0 */ /* 0 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1), __webpack_require__(2), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (treemode, textmode, util) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1), __webpack_require__(2), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = function (treemode, textmode, util) {
/** /**
* @constructor JSONEditor * @constructor JSONEditor
@ -342,13 +342,13 @@ return /******/ (function(modules) { // webpackBootstrap
JSONEditor.registerMode(textmode); JSONEditor.registerMode(textmode);
return JSONEditor; return JSONEditor;
}.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/***/ }, /***/ },
/* 1 */ /* 1 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(4), __webpack_require__(5), __webpack_require__(6), __webpack_require__(7), __webpack_require__(8), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (Highlighter, History, SearchBox, Node, modeswitcher, util) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(4), __webpack_require__(5), __webpack_require__(6), __webpack_require__(7), __webpack_require__(8), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = function (Highlighter, History, SearchBox, Node, modeswitcher, util) {
// create a mixin with the functions for tree mode // create a mixin with the functions for tree mode
var treemode = {}; var treemode = {};
@ -1060,14 +1060,14 @@ return /******/ (function(modules) { // webpackBootstrap
data: 'json' data: 'json'
} }
]; ];
}.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/***/ }, /***/ },
/* 2 */ /* 2 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(8), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (modeswitcher, util) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(8), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = function (modeswitcher, util) {
// create a mixin with the functions for text mode // create a mixin with the functions for text mode
var textmode = {}; var textmode = {};
@ -1356,14 +1356,14 @@ return /******/ (function(modules) { // webpackBootstrap
load: textmode.format load: textmode.format
} }
]; ];
}.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/***/ }, /***/ },
/* 3 */ /* 3 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { var __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
// create namespace // create namespace
var util = {}; var util = {};
@ -1403,14 +1403,15 @@ return /******/ (function(modules) { // webpackBootstrap
* @returns {JSON} json * @returns {JSON} json
*/ */
util.parseJS = function (jsString) { util.parseJS = function (jsString) {
// escape quotes inside strings // escape all single and double quotes inside strings
var chars = []; var chars = [];
var inString = false; var inString = false;
var i = 0; var i = 0;
while(i < jsString.length) { while(i < jsString.length) {
var c = jsString.charAt(i); var c = jsString.charAt(i);
var isEscaped = jsString.charAt(i - 1) === '\\';
if (c === '"' || c === '\'') { if ((c === '"' || c === '\'') && !isEscaped) {
if (c === inString) { if (c === inString) {
// end of string // end of string
inString = false; inString = false;
@ -1420,22 +1421,21 @@ return /******/ (function(modules) { // webpackBootstrap
inString = c; inString = c;
} }
else { else {
// add escape character if not escaped // add escape character
if (jsString.charAt(i - 1) !== '\\') {
chars.push('\\'); chars.push('\\');
} }
} }
}
chars.push(c); chars.push(c);
i++; i++;
} }
var jsonString = chars.join(''); var jsonString = chars.join('');
// replace keys/values enclosed by single quotes with double quotes // replace unescaped single quotes with double quotes,
jsonString = jsonString.replace(/(.)'/g, function ($0, $1) { // and replace escaped single quotes with unescaped single quotes
var str = $1.replace(/"/g, '\\"'); // escape double quotes // TODO: we could do this step immediately in the previous step
return ($1 == '\\') ? '\'' : str + '"'; jsonString = jsonString.replace(/(.?)'/g, function ($0, $1) {
return ($1 == '\\') ? '\'' : $1 + '"';
}); });
// enclose unquoted object keys with double quotes // enclose unquoted object keys with double quotes
@ -1912,13 +1912,13 @@ return /******/ (function(modules) { // webpackBootstrap
}; };
return util; return util;
}.call(exports, __webpack_require__, exports, module)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/***/ }, /***/ },
/* 4 */ /* 4 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { var __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
/** /**
* The highlighter can highlight/unhighlight a node, and * The highlighter can highlight/unhighlight a node, and
@ -2004,13 +2004,13 @@ return /******/ (function(modules) { // webpackBootstrap
}; };
return Highlighter; return Highlighter;
}.call(exports, __webpack_require__, exports, module)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/***/ }, /***/ },
/* 5 */ /* 5 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (util) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = function (util) {
/** /**
* @constructor History * @constructor History
@ -2232,14 +2232,14 @@ return /******/ (function(modules) { // webpackBootstrap
}; };
return History; return History;
}.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/***/ }, /***/ },
/* 6 */ /* 6 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { var __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
/** /**
* @constructor SearchBox * @constructor SearchBox
@ -2529,7 +2529,7 @@ return /******/ (function(modules) { // webpackBootstrap
}; };
return SearchBox; return SearchBox;
}.call(exports, __webpack_require__, exports, module)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
@ -2538,7 +2538,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* 7 */ /* 7 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9), __webpack_require__(10), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ContextMenu, appendNodeFactory, util) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9), __webpack_require__(10), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = function (ContextMenu, appendNodeFactory, util) {
/** /**
* @constructor Node * @constructor Node
@ -5465,13 +5465,13 @@ return /******/ (function(modules) { // webpackBootstrap
var AppendNode = appendNodeFactory(Node); var AppendNode = appendNodeFactory(Node);
return Node; return Node;
}.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/***/ }, /***/ },
/* 8 */ /* 8 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ContextMenu) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9)], __WEBPACK_AMD_DEFINE_RESULT__ = function (ContextMenu) {
/** /**
* Create a select box to be used in the editor menu's, which allows to switch mode * Create a select box to be used in the editor menu's, which allows to switch mode
@ -5573,14 +5573,14 @@ return /******/ (function(modules) { // webpackBootstrap
return { return {
create: createModeSwitcher create: createModeSwitcher
} }
}.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/***/ }, /***/ },
/* 9 */ /* 9 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (util) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = function (util) {
/** /**
* A context menu * A context menu
@ -6023,14 +6023,14 @@ return /******/ (function(modules) { // webpackBootstrap
}; };
return ContextMenu; return ContextMenu;
}.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/***/ }, /***/ },
/* 10 */ /* 10 */
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ContextMenu, util) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = function (ContextMenu, util) {
/** /**
* A factory function to create an AppendNode, which depends on a Node * A factory function to create an AppendNode, which depends on a Node
@ -6256,9 +6256,9 @@ return /******/ (function(modules) { // webpackBootstrap
// return the factory function // return the factory function
return appendNodeFactory; return appendNodeFactory;
}.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/***/ } /***/ }
/******/ ]) /******/ ])
}) });

File diff suppressed because one or more lines are too long

9
jsoneditor.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "jsoneditor", "name": "jsoneditor",
"version": "3.2.0-SNAPSHOT", "version": "3.1.2-SNAPSHOT",
"main": "jsoneditor.js", "main": "jsoneditor.js",
"description": "A web-based tool to view, edit and format JSON", "description": "A web-based tool to view, edit and format JSON",
"tags": [ "tags": [