internal static ICompiler GetCompiler(Config config)
        {
            string    ext      = Path.GetExtension(config.InputFile).ToUpperInvariant();
            ICompiler compiler = null;

            switch (ext)
            {
            case ".LESS":
                Initialize();
                compiler = new LessCompiler(_path);
                break;

            case ".SCSS":
                compiler = new SassCompiler();
                break;

            case ".COFFEE":
            case ".ICED":
                Initialize();
                compiler = new IcedCoffeeScriptCompiler(_path);
                break;
            }

            return(compiler);
        }
Exemple #2
0
        internal static ICompiler GetCompiler(Config config)
        {
            string    ext      = Path.GetExtension(config.InputFile).ToUpperInvariant();
            ICompiler compiler = null;

            Initialize();

            switch (ext)
            {
            case ".LESS":
                compiler = new LessCompiler(_path);
                break;

            case ".HANDLEBARS":
            case ".HBS":
                compiler = new HandlebarsCompiler(_path);
                break;

            case ".SCSS":
            case ".SASS":
                compiler = new SassCompiler(_path);
                break;

            case ".STYL":
            case ".STYLUS":
                compiler = new StylusCompiler(_path);
                break;

            case ".COFFEE":
            case ".ICED":
                compiler = new IcedCoffeeScriptCompiler(_path);
                break;

            case ".JS":
            case ".JSX":
            case ".ES6":
                compiler = new BabelCompiler(_path);
                break;
            }

            return(compiler);
        }
        internal static ICompiler GetCompiler(Config config)
        {
            string ext = Path.GetExtension(config.InputFile).ToUpperInvariant();
            ICompiler compiler = null;

            Initialize();

            switch (ext)
            {
                case ".LESS":
                    compiler = new LessCompiler(_path);
                    break;

                case ".SCSS":
                case ".SASS":
                    compiler = new SassCompiler(_path);
                    break;

                case ".STYL":
                case ".STYLUS":
                    compiler = new StylusCompiler(_path);
                    break;

                case ".COFFEE":
                case ".ICED":
                    compiler = new IcedCoffeeScriptCompiler(_path);
                    break;

                case ".JS":
                case ".JSX":
                case ".ES6":
                    compiler = new BabelCompiler(_path);
                    break;
            }

            return compiler;
        }