示例#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;
        }
示例#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("]");
        }
示例#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("]");
        }