ifandelse / Knockout.js-External-Template-Engine

Custom Template Engine and Template Source for Knockout.js that loads external templates. Supports native and jQuery templates.
Other
229 stars 43 forks source link

Create AMD module wrapper #14

Closed ifandelse closed 10 years ago

ifandelse commented 12 years ago

Just need to add an AMD-style wrapper for the build process.

antonellopasella commented 11 years ago

try with

require.config({
   baseUrl : '/',
   paths : {
       "jquery"         : "../components/jquery/jquery",
       "infuser"        : "../components/Knockout.js-External-Template-Engine/ext/infuser",
       "TrafficCop"     : "../components/Knockout.js-External-Template-Engine/ext/TrafficCop",
       "ko"             : "../components/knockoutjs/build/output/knockout-latest",
       "koext"          : "../components/Knockout.js-External-Template-Engine/lib/koExternalTemplateEngine-amd",
       "mainViewModel"  : '../scripts/models/mainViewModel',
       "domReady"       : "../components/requirejs-domready/domReady"
   },
   "shim" : {
       "infuser"        : {
           "deps": ["jquery"],
           "init": function(a){
               return window.infuser;
           }
       },
       "TrafficCop" : {
           "deps": ["jquery"]
       }
   }
});