Skip to content

Commit

Permalink
update UMD templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikos M committed Jul 20, 2016
1 parent 65b065d commit 5f4a5cf
Show file tree
Hide file tree
Showing 16 changed files with 140 additions and 37 deletions.
8 changes: 0 additions & 8 deletions beeld.config
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ tasks =[{}]
"@@ROOT@@" = "this"
"@@VERSION@@" = "0.8.0"
"@@DATE@@" = Xpresion::date("Y-m-d H:i:s")
"@@DEPENDENCIES@@" = "@dependencies: Classy.js, Asynchronous.js"
"@@USE_STRICT@@" = '"use strict";'
"@@MODULE@@" = "FILTER"
"@@DEPNAMES@@" = "'Classy','Asynchronous'"
"@@DEPS@@" = "Classy,Asynchronous"

@
Expand Down Expand Up @@ -112,7 +110,6 @@ tasks =[{}]

"@@ROOT@@" = "this"
"@@DATE@@" = Xpresion::date("Y-m-d H:i:s")
"@@DEPENDENCIES@@" = "@dependencies: Filter.js"
"@@USE_STRICT@@" = '"use strict";'
"@@PLUGIN@@" = "FILTER_WEBGL"
"@@MODULE@@" = "FILTER"
Expand Down Expand Up @@ -152,7 +149,6 @@ tasks =[{}]

"@@ROOT@@" = "this"
"@@DATE@@" = Xpresion::date("Y-m-d H:i:s")
"@@DEPENDENCIES@@" = "@dependencies: Filter.js"
"@@USE_STRICT@@" = '"use strict";'
"@@PLUGIN@@" = "FILTER_CODECS"
"@@MODULE@@" = "FILTER"
Expand Down Expand Up @@ -189,7 +185,6 @@ tasks =[{}]

"@@ROOT@@" = "this"
"@@DATE@@" = Xpresion::date("Y-m-d H:i:s")
"@@DEPENDENCIES@@" = "@dependencies: Filter.js"
"@@USE_STRICT@@" = '"use strict";'
"@@PLUGIN@@" = "FILTER_INTERPOLATION"
"@@MODULE@@" = "FILTER"
Expand Down Expand Up @@ -223,7 +218,6 @@ tasks =[{}]

"@@ROOT@@" = "this"
"@@DATE@@" = Xpresion::date("Y-m-d H:i:s")
"@@DEPENDENCIES@@" = "@dependencies: Filter.js"
"@@USE_STRICT@@" = '"use strict";'
"@@PLUGIN@@" = "FILTER_TRANSFORMS"
"@@MODULE@@" = "FILTER"
Expand Down Expand Up @@ -261,7 +255,6 @@ tasks =[{}]

"@@ROOT@@" = "this"
"@@DATE@@" = Xpresion::date("Y-m-d H:i:s")
"@@DEPENDENCIES@@" = "@dependencies: Filter.js"
"@@USE_STRICT@@" = '"use strict";'
"@@PLUGIN@@" = "FILTER_ML
"@@MODULE@@" = "FILTER"
Expand Down Expand Up @@ -314,7 +307,6 @@ tasks =[{}]

"@@ROOT@@" = "this"
"@@DATE@@" = Xpresion::date("Y-m-d H:i:s")
"@@DEPENDENCIES@@" = "@dependencies: Filter.js"
"@@USE_STRICT@@" = '"use strict";'
"@@PLUGIN@@" = "FILTER_PLUGINS"
"@@MODULE@@" = "FILTER"
Expand Down
10 changes: 5 additions & 5 deletions build/filter.bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/filter.codecs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @version: @@VERSION@@
* @dependencies: Filter.js
*
* JavaScript Image Processing Library (File Codecs)
* JavaScript Image Processing Library (Image Codecs)
* https://github.com/foo123/FILTER.js
*
**/!function( root, factory ){
Expand All @@ -25,7 +25,7 @@ else /* Browser/WebWorker/.. */
* @version: @@VERSION@@
* @dependencies: Filter.js
*
* JavaScript Image Processing Library (File Codecs)
* JavaScript Image Processing Library (Image Codecs)
* https://github.com/foo123/FILTER.js
*
**/
Expand Down
2 changes: 1 addition & 1 deletion build/filter.codecs.min.js

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions build/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
*
* FILTER.js
* @version: 0.8.0
* @built on 2016-07-19 22:00:50
* @built on 2016-07-20 12:11:48
* @dependencies: Classy.js, Asynchronous.js
*
* JavaScript Image Processing Library
* https://github.com/foo123/FILTER.js
*
**/!function( root, name, factory ){
"use strict";
var deps = "Classy,Asynchronous".split(/\s*,\s*/);
function extract(obj,keys,index,load){return obj ? keys.map(function(k, i){return (index ? obj[i] : obj[k]) || (load?load(k):null); }) : [];}
if ( ('object'===typeof module) && module.exports ) /* CommonJS */
(module.$deps = module.$deps||{}) && (module.exports = module.$deps[name] = factory.apply(root, extract(module.$deps,['Classy','Asynchronous'],false,function(k){return require("./"+k.toLowerCase());})));
(module.$deps = module.$deps||{}) && (module.exports = module.$deps[name] = factory.apply(root, extract(module.$deps,deps,false,function(k){return require("./"+k.toLowerCase());})));
else if ( ('function'===typeof define)&&define.amd&&('function'===typeof require)&&('function'===typeof require.specified)&&require.specified(name) /*&& !require.defined(name)*/ ) /* AMD */
define(name,['module'].concat(['Classy','Asynchronous']),function(module){factory.moduleUri = module.uri; return factory.apply(root, extract(Array.prototype.slice.call(arguments,1),['Classy','Asynchronous'],true));});
define(name,['module'].concat(deps),function(module){factory.moduleUri = module.uri; return factory.apply(root, extract(Array.prototype.slice.call(arguments,1),deps,true));});
else if ( !(name in root) ) /* Browser/WebWorker/.. */
(root[name]=factory.apply(root, extract(root,['Classy','Asynchronous'])))&&('function'===typeof(define))&&define.amd&&define(function(){return root[name];} );
(root[name]=factory.apply(root, extract(root,deps)))&&('function'===typeof(define))&&define.amd&&define(function(){return root[name];} );
}( /* current root */ this,
/* module name */ "FILTER",
/* module factory */ function ModuleFactory__FILTER( Classy,Asynchronous ){
Expand All @@ -26,7 +27,7 @@ else if ( !(name in root) ) /* Browser/WebWorker/.. */
*
* FILTER.js
* @version: 0.8.0
* @built on 2016-07-19 22:00:50
* @built on 2016-07-20 12:11:48
* @dependencies: Classy.js, Asynchronous.js
*
* JavaScript Image Processing Library
Expand Down
8 changes: 4 additions & 4 deletions build/filter.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/FILTER.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* FILTER.js
* @version: @@VERSION@@
* @built on @@DATE@@
* @@DEPENDENCIES@@
* @dependencies: Classy.js, Asynchronous.js
*
* JavaScript Image Processing Library
* https://github.com/foo123/FILTER.js
Expand Down
4 changes: 2 additions & 2 deletions src/codecs/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
*
* FILTER.js Codecs
* @version: @@VERSION@@
* @@DEPENDENCIES@@
* @dependencies: Filter.js
*
* JavaScript Image Processing Library (File Codecs)
* JavaScript Image Processing Library (Image Codecs)
* https://github.com/foo123/FILTER.js
*
**/
Expand Down
2 changes: 1 addition & 1 deletion src/filters/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* FILTER.js Generic Filters
* @version: @@VERSION@@
* @@DEPENDENCIES@@
* @dependencies: Filter.js
*
* JavaScript Image Processing Library (Generic Filters)
* https://github.com/foo123/FILTER.js
Expand Down
2 changes: 1 addition & 1 deletion src/interpolation/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* FILTER.js Interpolation Routines
* @version: @@VERSION@@
* @@DEPENDENCIES@@
* @dependencies: Filter.js
*
* JavaScript Image Processing Library (Interpolation Routines)
* https://github.com/foo123/FILTER.js
Expand Down
2 changes: 1 addition & 1 deletion src/loaders/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* FILTER.js Loaders
* @version: @@VERSION@@
* @@DEPENDENCIES@@
* @dependencies: Filter.js
*
* JavaScript Image Processing Library (Loaders)
* https://github.com/foo123/FILTER.js
Expand Down
4 changes: 2 additions & 2 deletions src/ml/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
*
* FILTER.js MachineLearning Routines
* @version: @@VERSION@@
* @@DEPENDENCIES@@
* @dependencies: Filter.js
*
* JavaScript Image Processing Library (MachineLearning Routines)
* JavaScript Image Processing Library (Machine Learning Routines)
* https://github.com/foo123/FILTER.js
*
**/
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* FILTER.js Plugins
* @version: @@VERSION@@
* @@DEPENDENCIES@@
* @dependencies: Filter.js
*
* JavaScript Image Processing Library (Plugins)
* https://github.com/foo123/FILTER.js
Expand Down
2 changes: 1 addition & 1 deletion src/transforms/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* FILTER.js Transforms
* @version: @@VERSION@@
* @@DEPENDENCIES@@
* @dependencies: Filter.js
*
* JavaScript Image Processing Library (Transforms)
* https://github.com/foo123/FILTER.js
Expand Down
110 changes: 110 additions & 0 deletions src/utils/base64.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
/**
*
* Filter Utils, utf8 / base64
* @package FILTER.js
*
**/
!function(FILTER, undef){
@@USE_STRICT@@

var a2b_re = /[^A-Za-z0-9\+\/\=]/g, hex_re = /\x0d\x0a/g;

FILTER.Utf8 = {
encode: function( string ) {
string = string.replace(hex_re, "\x0a");
var output = '', n, l, c, CC = String.fromCharCode;
for (n=0,l=string.length; n<l; n++)
{
c = string.charCodeAt(n);
if ( c < 128 )
output += CC(c);
else if ( (c > 127) && (c < 2048) )
output += CC((c >> 6) | 192) + CC((c & 63) | 128);
else
output += CC((c >> 12) | 224) + CC(((c >> 6) & 63) | 128) + CC((c & 63) | 128);
}
return output;
},
decode: function( input ) {
var string = '', i = 0, c = c1 = c2 = 0, l = input.length, CC = String.fromCharCode;
while (i < l)
{
c = input.charCodeAt(i);
if ( c < 128 )
{
string += CC(c);
i++;
}
else if ( (c > 191) && (c < 224) )
{
c2 = input.charCodeAt(i+1);
string += CC(((c & 31) << 6) | (c2 & 63));
i += 2;
}
else
{
c2 = input.charCodeAt(i+1);
c3 = input.charCodeAt(i+2);
string += CC(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
return string;
}
};

FILTER.Base64: {
encode: function( input ) {
input = FILTER.Utf8.encode( input );
var output = '', chr1, chr2, chr3,
enc1, enc2, enc3, enc4, i = 0, l = input.length,
keyString = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
while ( i < l )
{
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if ( isNaN(chr2) )
{
enc3 = enc4 = 64;
}
else if ( isNaN(chr3) )
{
enc4 = 64;
}
output = output + keyString.charAt(enc1) + keyString.charAt(enc2) + keyString.charAt(enc3) + keyString.charAt(enc4);
}
return output;
},
decode: function( input ) {
input = input.replace(a2b_re, '');
var output = '', chr1, chr2, chr3, enc1, enc2, enc3, enc4, i = 0, l = input.length, CC = String.fromCharCode;
while ( i < l )
{
enc1 = keyString.indexOf(input.charAt(i++));
enc2 = keyString.indexOf(input.charAt(i++));
enc3 = keyString.indexOf(input.charAt(i++));
enc4 = keyString.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + CC(chr1);
if ( 64 != enc3 )
{
output += CC(chr2);
}
if ( 64 != enc4 )
{
output += CC(chr3);
}
}
output = FILTER.Utf8.decode( output );
return output;
}
};

}(FILTER);
4 changes: 2 additions & 2 deletions src/webgl/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
*
* FILTER.js WebGL Filters
* @version: @@VERSION@@
* @@DEPENDENCIES@@
* @dependencies: Filter.js
*
* JavaScript Image Processing Library (WebGL Filters)
* JavaScript Image Processing Library (WebGL / SVG Filters)
* https://github.com/foo123/FILTER.js
*
**/
Expand Down

0 comments on commit 5f4a5cf

Please sign in to comment.