Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * We are initializing knockout and addtional extensions that
- * we are going to use in this project.
- */
- import ko = require( 'knockout' );
- import koPunches = require( 'knockout.punches' );
- // not sure what was the reason, but ts actually cuts out
- // import statements that are not used anywhere
- // so we will workaround this by "using" them in fake way
- var fakeArray = [ ko , koPunches ];
- //
- // those two are not coming with node.js module (attr binder) or
- // their node.js implementation is broken for browserify (knockout.es5)
- // so we are going to use var=require instead to bypass typescript typechecker
- var koAttributeBinder: any = require( './vendor/knockout-attribute-binder' );
- var koES5: any = require( './vendor/knockout.es5' );
- // we are setting attribute binder syntax to ko-binding, ex. ko-click, ko-value, ko-foreach
- koAttributeBinder.setPrefix( 'ko' );
- koAttributeBinder.install( true );
- // finally we are going to enable knockout punches
- ko.punches.enableAll();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement