fix loading, minify with rollup
This commit is contained in:
parent
9c3450947b
commit
dd5237e4ed
156 changed files with 794 additions and 971 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.api <f> Turns an array into a list API
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
(function() {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.avg <f> Returns the average of an array's values, or an object's properties
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.hsl <f> Takes RGB values and returns HSL values
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
//@ Ox.AMPM <[s]> ['AM', 'PM']
|
||||
Ox.AMPM = ['AM', 'PM'];
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.load <f> Loads OxJS and, optionally, one or more modules
|
||||
|
|
@ -79,7 +79,7 @@ Ox.load = function() {
|
|||
fn(function() {
|
||||
Ox.forEach(modules, async function(options, module) {
|
||||
console.log("load module!", module, options)
|
||||
const obj = await import('../../' + module + '/index.js?' + Ox.VERSION);
|
||||
const obj = await import(Ox.PATH + module + '/' + module + '.js?' + Ox.VERSION);
|
||||
Ox.load[module](options, function(success) {
|
||||
succeeded += success;
|
||||
if (++loaded == length) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.$ <f> Generic HTML element, mimics jQuery
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
//@ Ox.getDate <f> Get the day of a date, optionally UTC
|
||||
// see Ox.setSeconds for source code
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.encodeBase26 <b> Encode a number as bijective base26
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.formatArea <f> Formats a number of meters as square meters or kilometers
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.cache <f> Memoize a function
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
(function() {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
(function() {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.oshash <f> Calculates oshash for a given file or blob object. Async.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
var globalEval = eval;
|
||||
|
||||
/*@
|
||||
Ox.doc <f> Generates documentation for annotated JavaScript
|
||||
|
|
@ -828,7 +830,7 @@ Ox.test = function(argument, callback) {
|
|||
);
|
||||
}
|
||||
Ox.Log('TEST', statement);
|
||||
actual = eval(statement);
|
||||
actual = globalEval(statement);
|
||||
if (!isAsync && test.expected) {
|
||||
Ox.test.data[id].results.push({
|
||||
actual: stringifyResult(actual),
|
||||
|
|
@ -837,7 +839,7 @@ Ox.test = function(argument, callback) {
|
|||
section: item.section,
|
||||
statement: statement,
|
||||
passed: Ox.isEqual(
|
||||
actual, eval('(' + test.expected + ')')
|
||||
actual, globalEval('(' + test.expected + ')')
|
||||
)
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
(function() {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.acosh <f> Inverse hyperbolic cosine
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.extend <function> Extends an object with one or more other objects
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
var globalEval = eval;
|
||||
|
||||
(function(window) {
|
||||
|
||||
|
|
@ -210,7 +212,7 @@ import Ox from './Namespace.js';
|
|||
}
|
||||
return {
|
||||
parse: function parse(string) {
|
||||
return eval('(' + string + ')');
|
||||
return globalEval('(' + string + ')');
|
||||
},
|
||||
stringify: function stringify(value) {
|
||||
var ret = 'null', type = Ox.typeOf(value);
|
||||
|
|
@ -397,7 +399,7 @@ import Ox from './Namespace.js';
|
|||
].forEach(function(item) {
|
||||
var object = item[0], keys = item[1];
|
||||
keys.forEach(function(key) {
|
||||
if (!key in object) {
|
||||
if (!(key in object)) {
|
||||
if (canDefineProperty) {
|
||||
Object.defineProperty(object, key, {
|
||||
configurable: true,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.escapeRegExp <f> Escapes a string for use in a regular expression
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.get <f> Get a remote resource
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.char <f> Alias for String.fromCharCode
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.checkType <f> Throws a TypeError if a value is not of a given type
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import Ox from './Namespace.js';
|
||||
import Ox from './Ox.Global.js';
|
||||
|
||||
/*@
|
||||
Ox.getVideoFormat <f> Get supported video format
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue