Exemple #1
0
      private static FunctionObject LoadUglify(CSharp.Context context, ResourceHelper resourceHelper)
      {
         string uglifyCode = resourceHelper.Get("uglify-js.js");
         context.Execute(String.Concat(uglifyCode));

         return context.GetGlobalAs<FunctionObject>("uglify");
      }
Exemple #2
0
      private static FunctionObject LoadUglify(CSharp.Context context, ResourceHelper resourceHelper)
      {
         const string defineModule = "var module = {};";

         string uglifyCode = resourceHelper.Get("uglify-js.js");
         context.Execute(String.Concat(defineModule, uglifyCode));

         return context.GetGlobalAs<FunctionObject>("uglify");
      }