예제 #1
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();
        }
예제 #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());
        }
예제 #3
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();
        }
예제 #4
0
파일: CsonCompiler.cs 프로젝트: waodng/VSIX
        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());
        }
예제 #5
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();

            parameters.Add("service", ServiceName);
            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();
        }
예제 #6
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();
        }
예제 #7
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());
        }
예제 #8
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());
        }
        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();
        }
예제 #10
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");

            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();
        }
예제 #11
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();
        }
예제 #12
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());
        }
예제 #13
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());
        }
예제 #14
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();
        }
예제 #15
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();

            parameters.Add("service", ServiceName);
            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());
        }
        // ^ 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
        // ^ 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());
        }