-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
About 1/4th done. Also correct some usages & properties. Fixes madskristensen#480, madskristensen#387
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,10 +30,10 @@ protected override string GetArguments(string sourceFileName, string targetFileN | |
{ | ||
var args = new StringBuilder(); | ||
|
||
if (WESettings.GetBoolean(WESettings.Keys.WrapCoffeeScriptClosure)) | ||
if (!WESettings.Instance.CoffeeScript.WrapClosure) | ||
args.Append("--bare "); | ||
|
||
if (WESettings.GetBoolean(WESettings.Keys.CoffeeScriptSourceMaps) && !InUnitTests) | ||
if (WESettings.Instance.CoffeeScript.GenerateSourceMaps && !InUnitTests) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
am11
|
||
args.Append("--map "); | ||
|
||
args.AppendFormat(CultureInfo.CurrentCulture, "--output \"{0}\" --compile \"{1}\"", Path.GetDirectoryName(targetFileName), sourceFileName); | ||
|
@@ -65,18 +65,17 @@ private static void ProcessMapFile(string jsFileName) | |
File.Delete(oldSourceMapFile); | ||
// end-Hack | ||
|
||
if (WESettings.GetBoolean(WESettings.Keys.CoffeeScriptSourceMaps)) | ||
if (WESettings.Instance.CoffeeScript.GenerateSourceMaps) | ||
{ | ||
Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() => | ||
{ | ||
Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() => { | ||
ProjectHelpers.AddFileToProject(jsFileName, sourceMapFile); | ||
}), DispatcherPriority.ApplicationIdle, null); | ||
} | ||
} | ||
|
||
private static string UpdateSourceMapUrls(string content, string compiledFileName) | ||
{ | ||
if (!WESettings.GetBoolean(WESettings.Keys.LessSourceMaps) || !File.Exists(compiledFileName)) | ||
if (!WESettings.Instance.CoffeeScript.GenerateSourceMaps || !File.Exists(compiledFileName)) | ||
return content; | ||
|
||
string sourceMapFilename = compiledFileName + ".map"; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ protected override string GetArguments(string sourceFileName, string targetFileN | |
{ | ||
var args = new StringBuilder("--no-color --relative-urls "); | ||
|
||
if (WESettings.GetBoolean(WESettings.Keys.LessSourceMaps)) | ||
if (WESettings.Instance.Less.GenerateSourceMaps) | ||
{ | ||
string baseFolder = null; | ||
This comment has been minimized.
Sorry, something went wrong.
SLaks
Author
Owner
|
||
if (!InUnitTests) | ||
|
@@ -57,7 +57,8 @@ protected override string PostProcessResult(string resultSource, string sourceFi | |
var message = "LESS: " + Path.GetFileName(sourceFileName) + " compiled."; | ||
|
||
// If the caller wants us to renormalize URLs to a different filename, do so. | ||
if (!string.IsNullOrWhiteSpace(WESettings.GetString(WESettings.Keys.LessCompileToLocation)) && targetFileName != null && resultSource.IndexOf("url(", StringComparison.OrdinalIgnoreCase) > 0) | ||
if (targetFileName != null && Path.GetDirectoryName(targetFileName) != Path.GetDirectoryName(sourceFileName) | ||
&& resultSource.IndexOf("url(", StringComparison.OrdinalIgnoreCase) > 0) | ||
{ | ||
try | ||
{ | ||
|
@@ -80,7 +81,7 @@ protected override string PostProcessResult(string resultSource, string sourceFi | |
|
||
private static string UpdateSourceMapUrls(string content, string compiledFileName) | ||
{ | ||
if (!WESettings.GetBoolean(WESettings.Keys.LessSourceMaps) || !File.Exists(compiledFileName)) | ||
if (!WESettings.Instance.Less.GenerateSourceMaps || !File.Exists(compiledFileName)) | ||
return content; | ||
|
||
string sourceMapFilename = compiledFileName + ".map"; | ||
|
@am11 Why do we need this in LESS but not SASS?
Can we always use pure relative paths & get rid of this dependency?