From ef56d0b6ae428e312f7f2113691229aef97f4c92 Mon Sep 17 00:00:00 2001 From: Adam Tal Date: Tue, 16 Feb 2016 12:30:49 +0200 Subject: [PATCH 1/4] Added package.json and bower.json --- bower.json | 22 ++++++++++++++++++++++ package.json | 8 ++++++++ 2 files changed, 30 insertions(+) create mode 100644 bower.json create mode 100644 package.json diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..694741b --- /dev/null +++ b/bower.json @@ -0,0 +1,22 @@ +{ + "name": "knockout.wrap", + "description": "Simple fast js to ko and ko to js mapper", + "main": "knockout.wrap.js", + "authors": [ + "Anders Rune Jensen" + ], + "license": "MIT", + "keywords": [ + "knockout", + "mapping", + "wrap", + "fast" + ], + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "tests", + "*.nupkg" + ] +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..acbb34d --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name": "knockout.wrap", + "version": "0.0.1", + "description": "Simple fast js to ko and ko to js mapper", + "main": "knockout.wrap.js", + "author": "Anders Rune Jensen", + "license": "MIT" +} \ No newline at end of file From cbe6674336536a3abdb2106c312f532c0001bcfd Mon Sep 17 00:00:00 2001 From: Adam Tal Date: Tue, 16 Feb 2016 12:31:27 +0200 Subject: [PATCH 2/4] Reformatted knockout.wrap.js code (spacing and indenting) --- knockout.wrap.js | 247 +++++++++++++++++++++-------------------------- 1 file changed, 108 insertions(+), 139 deletions(-) diff --git a/knockout.wrap.js b/knockout.wrap.js index c65e0c8..3c33f92 100644 --- a/knockout.wrap.js +++ b/knockout.wrap.js @@ -1,133 +1,113 @@ // Knockout Fast Mapping v0.1 // License: MIT (http://www.opensource.org/licenses/mit-license.php) -(function (factory) { - // Module systems magic dance. - - if (typeof require === "function" && typeof exports === "object" && typeof module === "object") { - // CommonJS or Node: hard-coded dependency on "knockout" - factory(require("knockout"), exports); - } else if (typeof define === "function" && define["amd"]) { - // AMD anonymous module with hard-coded dependency on "knockout" - define(["knockout", "exports"], factory); - } else { - //