コード例 #1
0
ファイル: SassCompiler.cs プロジェクト: Kaldus/OrangeBits
 public CompileResults Compile(string inPath, string outPath)
 {
     SassAndCoffee.Ruby.Sass.SassCompiler compiler = new SassAndCoffee.Ruby.Sass.SassCompiler();
     string output = compiler.Compile(inPath, false, null);
     using (StreamWriter sw = new StreamWriter(outPath))
     {
         sw.WriteLine(OrangeBits.GetHeader(inPath));
         sw.Write(output);
     }
     return null;
 }
コード例 #2
0
        public override CompileResults Compile(string inPath, string outPath)
        {
            SassAndCoffee.Ruby.Sass.SassCompiler compiler = new SassAndCoffee.Ruby.Sass.SassCompiler();
            string output = compiler.Compile(inPath, false, null);

            using (StreamWriter sw = new StreamWriter(outPath))
            {
                sw.WriteLine(OrangeBits.GetHeader(inPath));
                sw.Write(output);
            }
            return(null);
        }
コード例 #3
0
        public void Process(BundleContext context, BundleResponse response)
        {
            var compiler = new SassAndCoffee.Ruby.Sass.SassCompiler();

            response.ContentType = "text/css";
            response.Content     = string.Empty;

            foreach (var fileInfo in response.Files)
            {
                if (fileInfo.Extension.Equals(".sass", StringComparison.Ordinal) || fileInfo.Extension.Equals(".scss", StringComparison.Ordinal))
                {
                    response.Content += compiler.Compile(fileInfo.FullName, false, new List <string>());
                }
                else if (fileInfo.Extension.Equals(".css", StringComparison.Ordinal))
                {
                    response.Content += File.ReadAllText(fileInfo.FullName);
                }
            }
        }
コード例 #4
0
        public void Process(BundleContext context, BundleResponse response)
        {
            var compiler = new SassAndCoffee.Ruby.Sass.SassCompiler();

            response.ContentType = "text/css";
            response.Content = string.Empty;

            foreach (var fileInfo in response.Files)
            {
                if (fileInfo.Extension.Equals(".sass", StringComparison.Ordinal) || fileInfo.Extension.Equals(".scss", StringComparison.Ordinal))
                {
                    response.Content += compiler.Compile(fileInfo.FullName, false, new List<string>());
                }
                else if (fileInfo.Extension.Equals(".css", StringComparison.Ordinal))
                {
                    response.Content += File.ReadAllText(fileInfo.FullName);
                }
            }
        }
コード例 #5
0
ファイル: SassCompiler.cs プロジェクト: Santas/NodeAssets
 public SassCompiler()
 {
     _compiler = new SassAndCoffee.Ruby.Sass.SassCompiler();
 }