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