Beispiel #1
0
        public override void Start()
        {
            var context = IronJsBootstrap.Initialize();

            WireUpJavaScriptConfigurationObject(context);

            var source = GetSourceString();

            context.Execute(@"(function () {
                               var config = new Config();
                               function run (obj) { config.run(obj); }
                               function use (obj) { config.use(obj); }
                               function map (str, obj) { config.map(str, obj); }" +
                            System.Environment.NewLine + source + System.Environment.NewLine +
                            @"})();");
        }
Beispiel #2
0
 private static string GetSourceString()
 {
     return(IronJsBootstrap.ReadSource(SourceFile));
 }