Skip to content

Commit

Permalink
LESS: Warning no longer stops compilation. Fixed #127
Browse files Browse the repository at this point in the history
Fixed #80
  • Loading branch information
madskristensen committed Oct 13, 2015
1 parent 7af2eda commit 35b0c7e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [x] Compile only when files have changed (#121)
- [x] Fixed loss of compile on save (#125)
- [x] LESS: Support for _less-plugin-csscomb_ (#126)
- [x] LESS: Warning no longer stops compilation (#127)
- [x] Initializing automatically in the background

Features that have a checkmark are complete and available for
Expand Down
2 changes: 1 addition & 1 deletion src/WebCompiler/Compile/CompilerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal static ICompiler GetCompiler(Config config)
string ext = Path.GetExtension(config.InputFile).ToUpperInvariant();
ICompiler compiler = null;

Initialize();
Initialize();

switch (ext)
{
Expand Down
4 changes: 2 additions & 2 deletions src/WebCompiler/Config/ConfigFileProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private CompilerResult ProcessConfig(string baseFolder, Config config)

var result = compiler.Compile(config);

if (result.HasErrors)
if (result.Errors.Any(e => !e.IsWarning))
return result;

if (Path.GetExtension(config.OutputFile).Equals(".css", StringComparison.OrdinalIgnoreCase) && AdjustRelativePaths(config))
Expand Down Expand Up @@ -157,7 +157,7 @@ private CompilerResult ProcessConfig(string baseFolder, Config config)

//if (!config.Minify.ContainsKey("enabled") || config.Minify["enabled"].ToString().Equals("true", StringComparison.OrdinalIgnoreCase))
//{
FileMinifier.MinifyFile(config);
FileMinifier.MinifyFile(config);
//}

if (config.SourceMap)
Expand Down
3 changes: 1 addition & 2 deletions src/WebCompilerVsix/CompilerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using System.Windows.Threading;
using EnvDTE80;
using WebCompiler;

Expand Down Expand Up @@ -111,7 +110,7 @@ public static void SourceFileChanged(string configFile, string sourceFile)
}
});
}

private static void ShowError(string configFile)
{
MessageBox.Show($"There is an error in the {Constants.CONFIG_FILENAME} file. This could be due to a change in the format after this extension was updated.", Constants.VSIX_NAME, MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification);
Expand Down

0 comments on commit 35b0c7e

Please sign in to comment.