C# 클래스 DouglasCrockford.JsMin.JsMinifier

The JavaScript Minifier
파일 보기 프로젝트 열기: Taritsyn/JSMin.NET 1 사용 예제들

공개 메소드들

메소드 설명
Minify ( string content ) : String

Removes a comments and unnecessary whitespace from JavaScript code

비공개 메소드들

메소드 설명
Action ( int d ) : void

Do something! What you do is determined by the argument: 1 - Output A. Copy B to A. Get the next B. 2 - Copy B to A. Get the next B. (Delete A). 3 - Get the next B. (Delete B). Action treats a string as a single character. Wow! Action recognizes a regular expression if it is preceded by ( or , or =.

Get ( ) : int

Returns a next character from input stream. Watch out for lookahead. If the character is a control character, translate it to a space or linefeed.

InnerMinify ( ) : void

Copies a input to the output, deleting the characters which are insignificant to JavaScript. Comments will be removed. Tabs will be replaced with spaces. Carriage returns will be replaced with linefeeds. Most spaces and linefeeds will be removed.

IsAlphanum ( int c ) : bool

Returns a true if the character is a letter, digit, underscore, dollar sign, or non-ASCII character

Next ( ) : int

Gets a next character, excluding comments. Peek() is used to see if a '/' is followed by a '/' or '*'.

Peek ( ) : int

Gets a next character without getting it

Put ( int c ) : void

Puts a character to output stream

메소드 상세

Minify() 공개 메소드

Removes a comments and unnecessary whitespace from JavaScript code
public Minify ( string content ) : String
content string JavaScript content
리턴 String