internal static ICompiler GetCompiler(Config config) { string ext = Path.GetExtension(config.InputFile).ToUpperInvariant(); ICompiler compiler = null; lock (_syncRoot) { Initialize(); } switch (ext) { case ".LESS": compiler = new LessCompiler(_path); break; case ".SCSS": case ".SASS": compiler = new SassCompiler(_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 ".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; }