protected override string GetPath(string sourceFileName, string targetFileName)
        {
            string mapFileName = targetFileName + ".map";
            string outputStyle = WESettings.Instance.Scss.OutputStyle.ToString().ToLowerInvariant();
            string numberPrecision = WESettings.Instance.Scss.NumberPrecision.ToString(CultureInfo.InvariantCulture);

            var parameters = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);
            parameters.Add("mapFileName", mapFileName);
            parameters.Add("precision", numberPrecision);
            parameters.Add("outputStyle", outputStyle);

            if (GenerateSourceMap)
                parameters.Add("sourceMapURL");

            if (WESettings.Instance.Css.Autoprefix)
            {
                parameters.Add("autoprefixer");

                if (!string.IsNullOrWhiteSpace(WESettings.Instance.Css.AutoprefixerBrowsers))
                    parameters.UriComponentsDictionary.Add("autoprefixerBrowsers", WESettings.Instance.Css.AutoprefixerBrowsers);
            }

            return parameters.FlattenParameters();
        }
示例#2
0
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            GetOrCreateGlobalSettings(ConfigFileName); // Ensure that default settings exist

            var parameters = new NodeServerUtilities.Parameters();

            parameters.UriComponentsDictionary.Add("service", ServiceName);
            parameters.UriComponentsDictionary.Add("sourceFileName", sourceFileName);
            parameters.UriComponentsDictionary.Add("targetFileName", targetFileName);
            parameters.Add("mapFileName", targetFileName + ".map");

            if (WESettings.Instance.Css.RtlCss)
            {
                parameters.Add("rtlcss");
            }

            if (WESettings.Instance.Css.Autoprefix)
            {
                parameters.Add("autoprefixer");

                if (!string.IsNullOrWhiteSpace(WESettings.Instance.Css.AutoprefixerBrowsers))
                {
                    parameters.Add("autoprefixerBrowsers", WESettings.Instance.Css.AutoprefixerBrowsers);
                }
            }

            return(parameters.FlattenParameters());
        }
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            string mapFileName = targetFileName + ".map";
            var parameters = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);
            parameters.Add("mapFileName", mapFileName);

            if (GenerateSourceMap)
                parameters.Add("sourceMapURL");

            if (!WESettings.Instance.Less.StrictMath)
                parameters.Add("strictMath");

            if (WESettings.Instance.Css.Autoprefix)
            {
                parameters.Add("autoprefixer");

                if (!string.IsNullOrWhiteSpace(WESettings.Instance.Css.AutoprefixerBrowsers))
                    parameters.Add("autoprefixerBrowsers", WESettings.Instance.Css.AutoprefixerBrowsers);
            }

            return parameters.FlattenParameters();
        }
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            GetOrCreateGlobalSettings(RtlCssCompiler.ConfigFileName);

            var parameters = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);
            parameters.Add("mapFileName", targetFileName + ".map");

            if (GenerateSourceMap)
                parameters.Add("sourceMapURL");

            if (WESettings.Instance.Less.StrictMath)
                parameters.Add("strictMath");

            if (WESettings.Instance.Css.Autoprefix)
            {
                parameters.Add("autoprefixer");

                if (!string.IsNullOrWhiteSpace(WESettings.Instance.Css.AutoprefixerBrowsers))
                    parameters.Add("autoprefixerBrowsers", WESettings.Instance.Css.AutoprefixerBrowsers);
            }

            if (WESettings.Instance.Css.RtlCss)
                parameters.Add("rtlcss");

            return parameters.FlattenParameters();
        }
示例#5
0
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            var parameters = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);

            return parameters.FlattenParameters();
        }
示例#6
0
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            var parameters = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);

            return(parameters.FlattenParameters());
        }
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            var parameters = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);
            parameters.Add("compiledTemplateName", Path.GetFileNameWithoutExtension(sourceFileName).Replace("-", "_"));

            return parameters.FlattenParameters();
        }
示例#8
0
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            GetOrCreateGlobalSettings(ConfigFile); // Ensure that default settings exist

            var parameters = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);

            return(parameters.FlattenParameters());
        }
示例#9
0
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            var parameters = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);
            parameters.Add("compiledTemplateName", CleanTemplateNameForJs(Path.GetFileNameWithoutExtension(sourceFileName)));

            return(parameters.FlattenParameters());
        }
示例#10
0
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            GetOrCreateGlobalSettings(ConfigFile); // Ensure that default settings exist

            var parameters = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);

            return parameters.FlattenParameters();
        }
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            var parameters = new NodeServerUtilities.Parameters();

            parameters.UriComponentsDictionary.Add("service", ServiceName);
            parameters.UriComponentsDictionary.Add("sourceFileName", sourceFileName);

            if (!string.IsNullOrWhiteSpace(WESettings.Instance.Css.AutoprefixerBrowsers))
                parameters.UriComponentsDictionary.Add("autoprefixerBrowsers", WESettings.Instance.Css.AutoprefixerBrowsers);

            return parameters.FlattenParameters();
        }
示例#12
0
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            var parameters = new NodeServerUtilities.Parameters();

            parameters.UriComponentsDictionary.Add("service", ServiceName);
            parameters.UriComponentsDictionary.Add("sourceFileName", sourceFileName);

            if (!string.IsNullOrWhiteSpace(WESettings.Instance.Css.AutoprefixerBrowsers))
            {
                parameters.UriComponentsDictionary.Add("autoprefixerBrowsers", WESettings.Instance.Css.AutoprefixerBrowsers);
            }

            return(parameters.FlattenParameters());
        }
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            string mapFileName = targetFileName + ".map";
            var parameters = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);
            parameters.Add("mapFileName", mapFileName);

            if (GenerateSourceMap)
                parameters.Add("sourceMapURL");

            return parameters.FlattenParameters();
        }
示例#14
0
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            GetOrCreateGlobalSettings(RtlCssCompiler.ConfigFileName);

            string outputStyle     = WESettings.Instance.Scss.OutputStyle.ToString().ToLowerInvariant();
            string numberPrecision = WESettings.Instance.Scss.NumberPrecision.ToString(CultureInfo.InvariantCulture);

            var parameters = new NodeServerUtilities.Parameters();

            if (!WESettings.Instance.Scss.UseRubyRuntime)
            {
                parameters.Add("service", ServiceName);
            }
            else
            {
                parameters.Add("service", "RubySCSS");
                parameters.Add("rubyAuth", HttpUtility.UrlEncode(RubyScssServer.AuthenticationToken));
                parameters.Add("rubyPort", RubyScssServer.Port.ToString());
            }

            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);
            parameters.Add("mapFileName", targetFileName + ".map");
            parameters.Add("precision", numberPrecision);
            parameters.Add("outputStyle", outputStyle);

            if (GenerateSourceMap)
            {
                parameters.Add("sourceMapURL");
            }

            if (WESettings.Instance.Css.Autoprefix)
            {
                parameters.Add("autoprefixer");

                if (!string.IsNullOrWhiteSpace(WESettings.Instance.Css.AutoprefixerBrowsers))
                {
                    parameters.UriComponentsDictionary.Add("autoprefixerBrowsers", WESettings.Instance.Css.AutoprefixerBrowsers);
                }
            }

            if (WESettings.Instance.Css.RtlCss)
            {
                parameters.Add("rtlcss");
            }

            return(parameters.FlattenParameters());
        }
示例#15
0
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            string mapFileName = targetFileName + ".map";
            var    parameters  = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);
            parameters.Add("mapFileName", mapFileName);

            if (GenerateSourceMap)
            {
                parameters.Add("sourceMapURL");
            }

            return(parameters.FlattenParameters());
        }
        // ^ Since maps aren't yet supported by LiveScript
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            string mapFileName = targetFileName + ".map";
            var parameters = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);
            parameters.Add("mapFileName", mapFileName);

            if (GenerateSourceMap)
                parameters.Add("sourceMapURL");

            if (!WESettings.Instance.LiveScript.WrapClosure)
                parameters.Add("bare");

            return parameters.FlattenParameters();
        }
示例#17
0
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            GetOrCreateGlobalSettings(RtlCssCompiler.ConfigFileName);

            var parameters = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);
            parameters.Add("mapFileName", targetFileName + ".map");

            if (GenerateSourceMap)
            {
                parameters.Add("sourceMapURL");
            }

            if (WESettings.Instance.Less.StrictMath)
            {
                parameters.Add("strictMath");
            }

            if (WESettings.Instance.Less.AdjustRelativePaths)
            {
                parameters.Add("relativeUrls");
            }

            if (WESettings.Instance.Css.Autoprefix)
            {
                parameters.Add("autoprefixer");

                if (!string.IsNullOrWhiteSpace(WESettings.Instance.Css.AutoprefixerBrowsers))
                {
                    parameters.Add("autoprefixerBrowsers", WESettings.Instance.Css.AutoprefixerBrowsers);
                }
            }

            if (WESettings.Instance.Css.RtlCss)
            {
                parameters.Add("rtlcss");
            }

            return(parameters.FlattenParameters());
        }
示例#18
0
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            GetOrCreateGlobalSettings(RtlCssCompiler.ConfigFileName);

            string outputStyle = WESettings.Instance.Scss.OutputStyle.ToString().ToLowerInvariant();
            string numberPrecision = WESettings.Instance.Scss.NumberPrecision.ToString(CultureInfo.InvariantCulture);

            var parameters = new NodeServerUtilities.Parameters();

            if (!WESettings.Instance.Scss.UseRubyRuntime)
            {
                parameters.Add("service", ServiceName);
            }
            else
            {
                parameters.Add("service", "RubySCSS");
                parameters.Add("rubyAuth", HttpUtility.UrlEncode(RubyScssServer.AuthenticationToken));
                parameters.Add("rubyPort", RubyScssServer.Port.ToString(CultureInfo.InvariantCulture));
            }

            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);
            parameters.Add("mapFileName", targetFileName + ".map");
            parameters.Add("precision", numberPrecision);
            parameters.Add("outputStyle", outputStyle);

            if (GenerateSourceMap)
                parameters.Add("sourceMapURL");

            if (WESettings.Instance.Css.Autoprefix)
            {
                parameters.Add("autoprefixer");

                if (!string.IsNullOrWhiteSpace(WESettings.Instance.Css.AutoprefixerBrowsers))
                    parameters.UriComponentsDictionary.Add("autoprefixerBrowsers", WESettings.Instance.Css.AutoprefixerBrowsers);
            }

            if (WESettings.Instance.Css.RtlCss)
                parameters.Add("rtlcss");

            return parameters.FlattenParameters();
        }
示例#19
0
        // ^ Since maps aren't yet supported by LiveScript
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            string mapFileName = targetFileName + ".map";
            var    parameters  = new NodeServerUtilities.Parameters();

            parameters.Add("service", ServiceName);
            parameters.Add("sourceFileName", sourceFileName);
            parameters.Add("targetFileName", targetFileName);
            parameters.Add("mapFileName", mapFileName);

            if (GenerateSourceMap)
            {
                parameters.Add("sourceMapURL");
            }

            if (!WESettings.Instance.LiveScript.WrapClosure)
            {
                parameters.Add("bare");
            }

            return(parameters.FlattenParameters());
        }
示例#20
0
        protected override string GetPath(string sourceFileName, string targetFileName)
        {
            GetOrCreateGlobalSettings(ConfigFileName); // Ensure that default settings exist

            var parameters = new NodeServerUtilities.Parameters();

            parameters.UriComponentsDictionary.Add("service", ServiceName);
            parameters.UriComponentsDictionary.Add("sourceFileName", sourceFileName);
            parameters.UriComponentsDictionary.Add("targetFileName", targetFileName);
            parameters.Add("mapFileName", targetFileName + ".map");

            if (WESettings.Instance.Css.RtlCss)
                parameters.Add("rtlcss");

            if (WESettings.Instance.Css.Autoprefix)
            {
                parameters.Add("autoprefixer");

                if (!string.IsNullOrWhiteSpace(WESettings.Instance.Css.AutoprefixerBrowsers))
                    parameters.Add("autoprefixerBrowsers", WESettings.Instance.Css.AutoprefixerBrowsers);
            }

            return parameters.FlattenParameters();
        }