Exemplo n.º 1
0
        public SourceMapGenerator(string scriptPath, string sourceRoot, string basePath, UnicodeNewline?forceEols = null)
        {
            string scriptFileName = Path.GetFileName(scriptPath);

            this.SourceMapBuilder = new SourceMapBuilder(scriptFileName, sourceRoot, basePath);
            this.ForceEols        = forceEols;
        }
Exemplo n.º 2
0
        private void PrintStringListOn(List <string> strings, StringBuilder buffer)
        {
            bool first = true;

            buffer.Append("[");
            foreach (string str in strings)
            {
                if (!first)
                {
                    buffer.Append(",");
                }

                buffer.Append(SourceMapBuilder.EscapeQuotedStringLiteral(str, true));
                first = false;
            }

            buffer.Append("]");
        }
Exemplo n.º 3
0
        private void PrintStringListOn(List <string> strings, bool isPath, StringBuilder buffer)
        {
            bool first = true;

            buffer.Append("[");
            foreach (string str in strings)
            {
                if (!first)
                {
                    buffer.Append(",");
                }

                buffer.Append(SourceMapBuilder.EscapeQuotedStringLiteral(isPath ? GetRelativePath(str, this._basePath) : str, true));
                first = false;
            }

            buffer.Append("]");
        }