Moved the distribution files from root to the ./dist folder
This commit is contained in:
parent
75372fa3d7
commit
12214f930a
|
@ -6,10 +6,11 @@ https://github.com/josdejong/jsoneditor
|
||||||
## not yet released, version 4.0.0
|
## not yet released, version 4.0.0
|
||||||
|
|
||||||
- Ace editor and jsonlint are now packed with jsoneditor.js by default.
|
- Ace editor and jsonlint are now packed with jsoneditor.js by default.
|
||||||
|
- The distribution files are now moved from the root to the `/dist` folder.
|
||||||
- Reworked the source code to CommonJS modules, using `brace` to load Ace.
|
- Reworked the source code to CommonJS modules, using `brace` to load Ace.
|
||||||
- JSONP is now automatically stripped from JSON. Thanks @yanivefraim.
|
- JSONP is now automatically stripped from JSON. Thanks @yanivefraim.
|
||||||
- Fixed bugs in the JSON sanitizer, no longer manipulating comments or
|
- Fixed bugs in the JSON sanitizer, no longer manipulating JSON-like structures
|
||||||
JSON-like structures inside strings.
|
inside strings.
|
||||||
|
|
||||||
|
|
||||||
## 2015-01-25, version 3.2.0
|
## 2015-01-25, version 3.2.0
|
||||||
|
|
|
@ -73,8 +73,8 @@ download:
|
||||||
<!DOCTYPE HTML>
|
<!DOCTYPE HTML>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" type="text/css" href="jsoneditor/jsoneditor.min.css">
|
<link href="jsoneditor/dist/jsoneditor.min.css" rel="stylesheet" type="text/css">
|
||||||
<script src="jsoneditor/jsoneditor.min.js"></script>
|
<script src="jsoneditor/dist/jsoneditor.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="jsoneditor" style="width: 400px; height: 400px;"></div>
|
<div id="jsoneditor" style="width: 400px; height: 400px;"></div>
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
"url": "https://github.com/josdejong/jsoneditor.git"
|
"url": "https://github.com/josdejong/jsoneditor.git"
|
||||||
},
|
},
|
||||||
"main": [
|
"main": [
|
||||||
"jsoneditor.min.js",
|
"./dist/jsoneditor.min.js",
|
||||||
"jsoneditor.min.css"
|
"./dist/jsoneditor.min.css"
|
||||||
],
|
],
|
||||||
"bugs": "https://github.com/josdejong/jsoneditor/issues",
|
"bugs": "https://github.com/josdejong/jsoneditor/issues",
|
||||||
"ignore": [
|
"ignore": [
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
|
@ -33,12 +33,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.jsoneditor .field.empty {
|
.jsoneditor .field.empty {
|
||||||
background-image: url("img/jsoneditor-icons.png");
|
background-image: url("../img/jsoneditor-icons.png");
|
||||||
background-position: 0 -144px;
|
background-position: 0 -144px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jsoneditor .value.empty {
|
.jsoneditor .value.empty {
|
||||||
background-image: url("img/jsoneditor-icons.png");
|
background-image: url("../img/jsoneditor-icons.png");
|
||||||
background-position: -48px -144px;
|
background-position: -48px -144px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: transparent url("img/jsoneditor-icons.png");
|
background: transparent url("../img/jsoneditor-icons.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
.jsoneditor div.tree button.collapsed {
|
.jsoneditor div.tree button.collapsed {
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.jsoneditor div.tree button.dragarea {
|
.jsoneditor div.tree button.dragarea {
|
||||||
background: url("img/jsoneditor-icons.png") -72px -72px;
|
background: url("../img/jsoneditor-icons.png") -72px -72px;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@
|
||||||
border: none;
|
border: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-image: url("img/jsoneditor-icons.png");
|
background-image: url("../img/jsoneditor-icons.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
.jsoneditor-contextmenu ul li button div.expand {
|
.jsoneditor-contextmenu ul li button div.expand {
|
||||||
|
@ -289,7 +289,7 @@
|
||||||
height: 24px;
|
height: 24px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0 4px 0 0;
|
margin: 0 4px 0 0;
|
||||||
background: url("img/jsoneditor-icons.png") 0 -72px;
|
background: url("../img/jsoneditor-icons.png") 0 -72px;
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -463,7 +463,7 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
border: 1px solid #aec0f8;
|
border: 1px solid #aec0f8;
|
||||||
background: #e3eaf6 url("img/jsoneditor-icons.png");
|
background: #e3eaf6 url("../img/jsoneditor-icons.png");
|
||||||
color: #4D4D4D;
|
color: #4D4D4D;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
font-family: arial, sans-serif;
|
font-family: arial, sans-serif;
|
||||||
|
@ -592,7 +592,7 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border: none;
|
border: none;
|
||||||
background: url("img/jsoneditor-icons.png");
|
background: url("../img/jsoneditor-icons.png");
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1461,7 +1461,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
//If JSON starts with a function (characters/digits/"_-"), remove this function.
|
//If JSON starts with a function (characters/digits/"_-"), remove this function.
|
||||||
//This is useful for "stripping" JSONP objects to become JSON
|
//This is useful for "stripping" JSONP objects to become JSON
|
||||||
//For example: /* some comment */ function_12321321 ( [{"a":"b"}] ); => [{"a":"b"}]
|
//For example: /* some comment */ function_12321321 ( [{"a":"b"}] ); => [{"a":"b"}]
|
||||||
var match = jsString.match(/^(\/\*(.|[\r\n])*?\*\/)?\s*[\da-zA-Z_$]+\s*\(([\s\S]*)\)\s*;?\s*$/);
|
var match = jsString.match(/^\s*(\/\*(.|[\r\n])*?\*\/)?\s*[\da-zA-Z_$]+\s*\(([\s\S]*)\)\s*;?\s*$/);
|
||||||
if (match) {
|
if (match) {
|
||||||
jsString = match[3];
|
jsString = match[3];
|
||||||
}
|
}
|
||||||
|
@ -9376,7 +9376,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
};
|
};
|
||||||
init(true);function init(packaged) {
|
init(true);function init(packaged) {
|
||||||
|
|
||||||
options.packaged = packaged || acequire.packaged || module.packaged || (global.define && __webpack_require__(17).packaged);
|
options.packaged = packaged || acequire.packaged || module.packaged || (global.define && __webpack_require__(19).packaged);
|
||||||
|
|
||||||
if (!global.document)
|
if (!global.document)
|
||||||
return "";
|
return "";
|
||||||
|
@ -26208,7 +26208,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
if (!args[1])
|
if (!args[1])
|
||||||
throw new Error('Usage: '+args[0]+' FILE');
|
throw new Error('Usage: '+args[0]+' FILE');
|
||||||
if (typeof process !== 'undefined') {
|
if (typeof process !== 'undefined') {
|
||||||
var source = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"fs\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())).readFileSync(__webpack_require__(20).join(process.cwd(), args[1]), "utf8");
|
var source = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"fs\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())).readFileSync(__webpack_require__(17).join(process.cwd(), args[1]), "utf8");
|
||||||
} else {
|
} else {
|
||||||
var cwd = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"file\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())).path(__webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"file\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())).cwd());
|
var cwd = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"file\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())).path(__webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"file\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())).cwd());
|
||||||
var source = cwd.join(args[1]).read({charset: "utf-8"});
|
var source = cwd.join(args[1]).read({charset: "utf-8"});
|
||||||
|
@ -26219,7 +26219,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
exports.main(typeof process !== 'undefined' ? process.argv.slice(1) : __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"system\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())).args);
|
exports.main(typeof process !== 'undefined' ? process.argv.slice(1) : __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"system\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())).args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(19), __webpack_require__(18)(module)))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(18), __webpack_require__(20)(module)))
|
||||||
|
|
||||||
/***/ },
|
/***/ },
|
||||||
/* 16 */
|
/* 16 */
|
||||||
|
@ -26230,121 +26230,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
|
|
||||||
/***/ },
|
/***/ },
|
||||||
/* 17 */
|
/* 17 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
module.exports = function() { throw new Error("define cannot be used indirect"); };
|
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
|
||||||
/* 18 */
|
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
module.exports = function(module) {
|
|
||||||
if(!module.webpackPolyfill) {
|
|
||||||
module.deprecate = function() {};
|
|
||||||
module.paths = [];
|
|
||||||
// module.parent = undefined by default
|
|
||||||
module.children = [];
|
|
||||||
module.webpackPolyfill = 1;
|
|
||||||
}
|
|
||||||
return module;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
|
||||||
/* 19 */
|
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
// shim for using process in browser
|
|
||||||
|
|
||||||
var process = module.exports = {};
|
|
||||||
|
|
||||||
process.nextTick = (function () {
|
|
||||||
var canSetImmediate = typeof window !== 'undefined'
|
|
||||||
&& window.setImmediate;
|
|
||||||
var canMutationObserver = typeof window !== 'undefined'
|
|
||||||
&& window.MutationObserver;
|
|
||||||
var canPost = typeof window !== 'undefined'
|
|
||||||
&& window.postMessage && window.addEventListener
|
|
||||||
;
|
|
||||||
|
|
||||||
if (canSetImmediate) {
|
|
||||||
return function (f) { return window.setImmediate(f) };
|
|
||||||
}
|
|
||||||
|
|
||||||
var queue = [];
|
|
||||||
|
|
||||||
if (canMutationObserver) {
|
|
||||||
var hiddenDiv = document.createElement("div");
|
|
||||||
var observer = new MutationObserver(function () {
|
|
||||||
var queueList = queue.slice();
|
|
||||||
queue.length = 0;
|
|
||||||
queueList.forEach(function (fn) {
|
|
||||||
fn();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
observer.observe(hiddenDiv, { attributes: true });
|
|
||||||
|
|
||||||
return function nextTick(fn) {
|
|
||||||
if (!queue.length) {
|
|
||||||
hiddenDiv.setAttribute('yes', 'no');
|
|
||||||
}
|
|
||||||
queue.push(fn);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (canPost) {
|
|
||||||
window.addEventListener('message', function (ev) {
|
|
||||||
var source = ev.source;
|
|
||||||
if ((source === window || source === null) && ev.data === 'process-tick') {
|
|
||||||
ev.stopPropagation();
|
|
||||||
if (queue.length > 0) {
|
|
||||||
var fn = queue.shift();
|
|
||||||
fn();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, true);
|
|
||||||
|
|
||||||
return function nextTick(fn) {
|
|
||||||
queue.push(fn);
|
|
||||||
window.postMessage('process-tick', '*');
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return function nextTick(fn) {
|
|
||||||
setTimeout(fn, 0);
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
|
|
||||||
process.title = 'browser';
|
|
||||||
process.browser = true;
|
|
||||||
process.env = {};
|
|
||||||
process.argv = [];
|
|
||||||
|
|
||||||
function noop() {}
|
|
||||||
|
|
||||||
process.on = noop;
|
|
||||||
process.addListener = noop;
|
|
||||||
process.once = noop;
|
|
||||||
process.off = noop;
|
|
||||||
process.removeListener = noop;
|
|
||||||
process.removeAllListeners = noop;
|
|
||||||
process.emit = noop;
|
|
||||||
|
|
||||||
process.binding = function (name) {
|
|
||||||
throw new Error('process.binding is not supported');
|
|
||||||
};
|
|
||||||
|
|
||||||
// TODO(shtylman)
|
|
||||||
process.cwd = function () { return '/' };
|
|
||||||
process.chdir = function (dir) {
|
|
||||||
throw new Error('process.chdir is not supported');
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
|
||||||
/* 20 */
|
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
|
/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
|
||||||
|
@ -26572,7 +26457,122 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(19)))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(18)))
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 18 */
|
||||||
|
/***/ function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
// shim for using process in browser
|
||||||
|
|
||||||
|
var process = module.exports = {};
|
||||||
|
|
||||||
|
process.nextTick = (function () {
|
||||||
|
var canSetImmediate = typeof window !== 'undefined'
|
||||||
|
&& window.setImmediate;
|
||||||
|
var canMutationObserver = typeof window !== 'undefined'
|
||||||
|
&& window.MutationObserver;
|
||||||
|
var canPost = typeof window !== 'undefined'
|
||||||
|
&& window.postMessage && window.addEventListener
|
||||||
|
;
|
||||||
|
|
||||||
|
if (canSetImmediate) {
|
||||||
|
return function (f) { return window.setImmediate(f) };
|
||||||
|
}
|
||||||
|
|
||||||
|
var queue = [];
|
||||||
|
|
||||||
|
if (canMutationObserver) {
|
||||||
|
var hiddenDiv = document.createElement("div");
|
||||||
|
var observer = new MutationObserver(function () {
|
||||||
|
var queueList = queue.slice();
|
||||||
|
queue.length = 0;
|
||||||
|
queueList.forEach(function (fn) {
|
||||||
|
fn();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
observer.observe(hiddenDiv, { attributes: true });
|
||||||
|
|
||||||
|
return function nextTick(fn) {
|
||||||
|
if (!queue.length) {
|
||||||
|
hiddenDiv.setAttribute('yes', 'no');
|
||||||
|
}
|
||||||
|
queue.push(fn);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canPost) {
|
||||||
|
window.addEventListener('message', function (ev) {
|
||||||
|
var source = ev.source;
|
||||||
|
if ((source === window || source === null) && ev.data === 'process-tick') {
|
||||||
|
ev.stopPropagation();
|
||||||
|
if (queue.length > 0) {
|
||||||
|
var fn = queue.shift();
|
||||||
|
fn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, true);
|
||||||
|
|
||||||
|
return function nextTick(fn) {
|
||||||
|
queue.push(fn);
|
||||||
|
window.postMessage('process-tick', '*');
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return function nextTick(fn) {
|
||||||
|
setTimeout(fn, 0);
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
process.title = 'browser';
|
||||||
|
process.browser = true;
|
||||||
|
process.env = {};
|
||||||
|
process.argv = [];
|
||||||
|
|
||||||
|
function noop() {}
|
||||||
|
|
||||||
|
process.on = noop;
|
||||||
|
process.addListener = noop;
|
||||||
|
process.once = noop;
|
||||||
|
process.off = noop;
|
||||||
|
process.removeListener = noop;
|
||||||
|
process.removeAllListeners = noop;
|
||||||
|
process.emit = noop;
|
||||||
|
|
||||||
|
process.binding = function (name) {
|
||||||
|
throw new Error('process.binding is not supported');
|
||||||
|
};
|
||||||
|
|
||||||
|
// TODO(shtylman)
|
||||||
|
process.cwd = function () { return '/' };
|
||||||
|
process.chdir = function (dir) {
|
||||||
|
throw new Error('process.chdir is not supported');
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 19 */
|
||||||
|
/***/ function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
module.exports = function() { throw new Error("define cannot be used indirect"); };
|
||||||
|
|
||||||
|
|
||||||
|
/***/ },
|
||||||
|
/* 20 */
|
||||||
|
/***/ function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
module.exports = function(module) {
|
||||||
|
if(!module.webpackPolyfill) {
|
||||||
|
module.deprecate = function() {};
|
||||||
|
module.paths = [];
|
||||||
|
// module.parent = undefined by default
|
||||||
|
module.children = [];
|
||||||
|
module.webpackPolyfill = 1;
|
||||||
|
}
|
||||||
|
return module;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ },
|
||||||
/* 21 */
|
/* 21 */
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -23,8 +23,8 @@ To implement JSONEditor in a web application, load the javascript and css file
|
||||||
in the head of the HTML page:
|
in the head of the HTML page:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link rel="stylesheet" type="text/css" href="jsoneditor/jsoneditor.min.css">
|
<link href="jsoneditor/dist/jsoneditor.min.css" rel="stylesheet" type="text/css">
|
||||||
<script src="jsoneditor/jsoneditor.min.js"></script>
|
<script src="jsoneditor/dist/jsoneditor.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Use
|
## Use
|
||||||
|
@ -72,8 +72,8 @@ var json = editor.get();
|
||||||
<!DOCTYPE HTML>
|
<!DOCTYPE HTML>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" type="text/css" href="jsoneditor/jsoneditor.min.css">
|
<link href="jsoneditor/dist/jsoneditor.min.css" rel="stylesheet" type="text/css">
|
||||||
<script src="jsoneditor/jsoneditor.min.js"></script>
|
<script src="jsoneditor/dist/jsoneditor.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<head>
|
<head>
|
||||||
<title>JSONEditor | Basic usage</title>
|
<title>JSONEditor | Basic usage</title>
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="../jsoneditor.css">
|
<link href="../dist/jsoneditor.css" rel="stylesheet" type="text/css">
|
||||||
<script src="../jsoneditor.js"></script>
|
<script src="../dist/jsoneditor.js"></script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#jsoneditor {
|
#jsoneditor {
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
<head>
|
<head>
|
||||||
<title>JSONEditor | Viewer</title>
|
<title>JSONEditor | Viewer</title>
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="../jsoneditor.css">
|
<link href="../dist/jsoneditor.css" rel="stylesheet" type="text/css">
|
||||||
<script src="../jsoneditor.js"></script>
|
<script src="../dist/jsoneditor.js"></script>
|
||||||
|
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body {
|
body {
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
<title>JSONEditor | Switch mode</title>
|
<title>JSONEditor | Switch mode</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="../jsoneditor.css">
|
<link href="../dist/jsoneditor.css" rel="stylesheet" type="text/css">
|
||||||
<script src="../jsoneditor.js"></script>
|
<script src="../dist/jsoneditor.js"></script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body {
|
body {
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<head>
|
<head>
|
||||||
<title>JSONEditor | Load and save</title>
|
<title>JSONEditor | Load and save</title>
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="../jsoneditor.css">
|
<link href="../dist/jsoneditor.css" rel="stylesheet" type="text/css">
|
||||||
<script src="../jsoneditor.js"></script>
|
<script src="../dist/jsoneditor.js"></script>
|
||||||
|
|
||||||
<script src="http://bgrins.github.io/filereader.js/filereader.js"></script>
|
<script src="http://bgrins.github.io/filereader.js/filereader.js"></script>
|
||||||
<script src="http://eligrey.com/demos/FileSaver.js/FileSaver.js"></script>
|
<script src="http://eligrey.com/demos/FileSaver.js/FileSaver.js"></script>
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<head>
|
<head>
|
||||||
<title>JSONEditor | Basic usage</title>
|
<title>JSONEditor | Basic usage</title>
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="../jsoneditor.css">
|
<link href="../dist/jsoneditor.css" rel="stylesheet" type="text/css">
|
||||||
<script src="../jsoneditor.js"></script>
|
<script src="../dist/jsoneditor.js"></script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#jsoneditor {
|
#jsoneditor {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<link rel="stylesheet" type="text/css" href="../../jsoneditor.css">
|
<link rel="stylesheet" type="text/css" href="../../dist/jsoneditor.css">
|
||||||
<script data-main="scripts/main" src="scripts/require.js"></script>
|
<script data-main="scripts/main" src="scripts/require.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
var module = '../../../jsoneditor';
|
var module = '../../../dist/jsoneditor';
|
||||||
require([module], function (JSONEditor) {
|
require([module], function (JSONEditor) {
|
||||||
// create the editor
|
// create the editor
|
||||||
var container = document.getElementById('jsoneditor');
|
var container = document.getElementById('jsoneditor');
|
||||||
|
|
33
gulpfile.js
33
gulpfile.js
|
@ -10,15 +10,15 @@ var uglify = require('uglify-js');
|
||||||
|
|
||||||
var ENTRY = './src/js/JSONEditor.js';
|
var ENTRY = './src/js/JSONEditor.js';
|
||||||
var HEADER = './src/js/header.js';
|
var HEADER = './src/js/header.js';
|
||||||
|
var IMAGE = './src/css/img/jsoneditor-icons.png';
|
||||||
|
var DIST = './dist';
|
||||||
var FILE = 'jsoneditor.js';
|
var FILE = 'jsoneditor.js';
|
||||||
var FILE_MIN = 'jsoneditor.min.js';
|
|
||||||
var FILE_MAP = 'jsoneditor.map';
|
var FILE_MAP = 'jsoneditor.map';
|
||||||
var DIST = './';
|
var JSONEDITOR_JS = DIST + '/' + FILE;
|
||||||
var JSONEDITOR_JS = DIST + FILE;
|
var JSONEDITOR_MIN_JS = DIST + '/jsoneditor.min.js';
|
||||||
var JSONEDITOR_MIN_JS = DIST + FILE_MIN;
|
var JSONEDITOR_MAP_JS = DIST + '/' + FILE_MAP;
|
||||||
var JSONEDITOR_MAP_JS = DIST + FILE_MAP;
|
var JSONEDITOR_CSS = DIST + '/jsoneditor.css';
|
||||||
var JSONEDITOR_CSS = DIST + 'jsoneditor.css';
|
var JSONEDITOR_MIN_CSS = DIST + '/jsoneditor.min.css';
|
||||||
var JSONEDITOR_MIN_CSS = DIST + 'jsoneditor.min.css';
|
|
||||||
|
|
||||||
// generate banner with today's date and correct version
|
// generate banner with today's date and correct version
|
||||||
function createBanner() {
|
function createBanner() {
|
||||||
|
@ -57,8 +57,14 @@ var uglifyConfig = {
|
||||||
// create a single instance of the compiler to allow caching
|
// create a single instance of the compiler to allow caching
|
||||||
var compiler = webpack(webpackConfig);
|
var compiler = webpack(webpackConfig);
|
||||||
|
|
||||||
|
// make dist and dist/img folders
|
||||||
|
gulp.task('mkdir', function () {
|
||||||
|
mkdirp.sync(DIST);
|
||||||
|
mkdirp.sync(DIST + '/img');
|
||||||
|
});
|
||||||
|
|
||||||
// bundle javascript
|
// bundle javascript
|
||||||
gulp.task('bundle', function (done) {
|
gulp.task('bundle', ['mkdir'], function (done) {
|
||||||
// update the banner contents (has a date in it which should stay up to date)
|
// update the banner contents (has a date in it which should stay up to date)
|
||||||
bannerPlugin.banner = createBanner();
|
bannerPlugin.banner = createBanner();
|
||||||
|
|
||||||
|
@ -74,7 +80,7 @@ gulp.task('bundle', function (done) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// bundle css
|
// bundle css
|
||||||
gulp.task('bundle-css', function () {
|
gulp.task('bundle-css', ['mkdir'], function () {
|
||||||
gulp.src([
|
gulp.src([
|
||||||
'src/css/jsoneditor.css',
|
'src/css/jsoneditor.css',
|
||||||
'src/css/contextmenu.css',
|
'src/css/contextmenu.css',
|
||||||
|
@ -92,11 +98,10 @@ gulp.task('bundle-css', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
// create a folder img and copy the icons
|
// create a folder img and copy the icons
|
||||||
gulp.task('copy-img', function () {
|
gulp.task('copy-img', ['mkdir'], function () {
|
||||||
mkdirp.sync('./img');
|
gulp.src(IMAGE)
|
||||||
gulp.src('./src/css/img/jsoneditor-icons.png')
|
.pipe(gulp.dest(DIST +'/img'));
|
||||||
.pipe(gulp.dest('./img/'));
|
gutil.log('Copied images');
|
||||||
gutil.log('Copied jsoneditor-icons.png to ./img/');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('minify', ['bundle'], function () {
|
gulp.task('minify', ['bundle'], function () {
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue