예제 #1
0
        // Compile all loaded script to a string
        public string CompileCssToString()
        {
            // Step 1, concatenate all files
            var sb = new StringBuilder();

            foreach (var file in m_files)
            {
                Console.WriteLine("Processing {0}...", System.IO.Path.GetFileName(file.filename));
                sb.Append(file.content);
                sb.Append("\n");
            }

            // Do the CSS compression
            var minified = new CssMin().Minify(sb.ToString(), MaxLineLength);

            // Return it
            return(minified);
        }
예제 #2
0
파일: Compiler.cs 프로젝트: blyry/MiniME
        /// <summary>
        /// Compile all loaded scripts to a string, using the css minifier.
        /// </summary>
        /// <returns>The compiled styles.</returns>
        public string CompileCssToString()
        {
            // Step 1, concatenate all files
            var sb = new StringBuilder();
            foreach (var file in m_files)
            {
                Console.WriteLine("Processing {0}...", System.IO.Path.GetFileName(file.filename));
                sb.Append(file.content);
                sb.Append("\n");
            }

            // Do the CSS compression
            var minified = new CssMin().Minify(sb.ToString(), MaxLineLength);

            // Return it
            return minified;
        }