The CoffeeScript compiler. Many thanks here to Andrey Taritsyn's
Inheritance: IDisposable
        /// <summary>
        /// Transforms the content of the given string.
        /// </summary>
        /// <param name="input">The input string to transform.</param>
        /// <param name="path">The path to the given input string to transform.</param>
        /// <param name="cruncher">The cruncher that is running the transform.</param>
        /// <returns>The transformed string.</returns>
        public string Transform(string input, string path, CruncherBase cruncher)
        {
            using (CoffeeScriptCompiler coffeeScriptCompiler = new CoffeeScriptCompiler(CruncherConfiguration.Instance.JsEngineFunc))
            {
                input = coffeeScriptCompiler.Compile(input);
            }

            return input;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Transforms the content of the given string.
        /// </summary>
        /// <param name="input">The input string to transform.</param>
        /// <param name="path">The path to the given input string to transform.</param>
        /// <param name="cruncher">The cruncher that is running the transform.</param>
        /// <returns>The transformed string.</returns>
        public string Transform(string input, string path, CruncherBase cruncher)
        {
            using (CoffeeScriptCompiler coffeeScriptCompiler = new CoffeeScriptCompiler(CruncherConfiguration.Instance.JsEngineFunc))
            {
                input = coffeeScriptCompiler.Compile(input);
            }

            return(input);
        }