private static void Compile(Project project)
        {
            LessCompiler compiler = new LessCompiler(Completed);

            string dir = Path.GetDirectoryName(project.Properties.Item("FullPath").Value.ToString());
            var files = Directory.GetFiles(dir, "*.less", SearchOption.AllDirectories).Where(f => CanCompile(f));

            foreach (string file in files)
            {
                compiler.Compile(file);
            }
        }
Пример #2
0
        private static void Compile(Project project)
        {
            LessCompiler compiler = new LessCompiler(Completed);

            string dir   = Path.GetDirectoryName(project.Properties.Item("FullPath").Value.ToString());
            var    files = Directory.GetFiles(dir, "*.less", SearchOption.AllDirectories).Where(f => CanCompile(f));

            foreach (string file in files)
            {
                compiler.Compile(file);
            }
        }
Пример #3
0
        protected override void StartCompiler(string source)
        {
            string fileName = GetCompiledFileName(Document.FilePath, ".css", UseCompiledFolder);// Document.FilePath.Replace(".less", ".css");

            if (_isFirstRun && File.Exists(fileName))
            {
                OnCompilationDone(File.ReadAllText(fileName), Document.FilePath);
            }
            else
            {
                Logger.Log("LESS: Compiling " + Path.GetFileName(Document.FilePath));

                System.Threading.Tasks.Task.Run(() =>
                {
                    LessCompiler compiler = new LessCompiler(Completed);
                    compiler.Compile(Document.FilePath);
                });
            }
        }
Пример #4
0
        protected override void StartCompiler(string source)
        {
            string fileName = GetCompiledFileName(Document.FilePath, ".css", UseCompiledFolder);// Document.FilePath.Replace(".less", ".css");

            if (_isFirstRun && File.Exists(fileName))
            {
                OnCompilationDone(File.ReadAllText(fileName), Document.FilePath);
            }
            else
            {
                Logger.Log("LESS: Compiling " + Path.GetFileName(Document.FilePath));

                System.Threading.Tasks.Task.Run(() =>
                {
                    LessCompiler compiler = new LessCompiler(Completed);
                    compiler.Compile(Document.FilePath);
                });
            }
        }