Preprocessor.js
function Preprocessor(source, baseDirOrIncludes, preserveLineNumbers) {
    /**
     * Source code to pre-process.
     * @type {string}
     * @expose
     */
    this.source = '' + source;

    /**
     * Source base directory.
     * @type {string}
     * @expose
     */
    this.baseDir = typeof baseDirOrIncludes === 'string' ? baseDirOrIncludes : '.';

    /**
     * Included sources by filename.
     * @type {Object.<string, string>}
     */
    this.includes = typeof baseDirOrIncludes === 'object' ? baseDirOrIncludes : {};

    /**
     * Preserve line numbers when removing blocks of code
     * @type {boolean}
     */
    this.preserveLineNumbers = typeof preserveLineNumbers === 'boolean' ? preserveLineNumbers : false;

    /**
     * Whether running inside of node.js or not.
     * @type {boolean}
     * @expose
     */
    this.isNode = (typeof window === 'undefined' || !window.window) && typeof require === 'function';

    /**
     * Error reporting source ahead length.
     * @type {number}
     * @expose
     */
    this.errorSourceAhead = 50;

    /**
     * Runtime defines.
     * @type {Array.<string>}
     */
    this.defines = [];
  }
function Preprocessor(source, baseDirOrIncludes, preserveLineNumbers) {
    /**
     * Source code to pre-process.
     * @type {string}
     * @expose
     */
    this.source = '' + source;

    /**
     * Source base directory.
     * @type {string}
     * @expose
     */
    this.baseDir = typeof baseDirOrIncludes === 'string' ? baseDirOrIncludes : '.';

    /**
     * Included sources by filename.
     * @type {Object.<string, string>}
     */
    this.includes = typeof baseDirOrIncludes === 'object' ? baseDirOrIncludes : {};

    /**
     * Preserve line numbers when removing blocks of code
     * @type {boolean}
     */
    this.preserveLineNumbers = typeof preserveLineNumbers === 'boolean' ? preserveLineNumbers : false;

    /**
     * Whether running inside of node.js or not.
     * @type {boolean}
     * @expose
     */
    this.isNode = (typeof window === 'undefined' || !window.window) && typeof require === 'function';

    /**
     * Error reporting source ahead length.
     * @type {number}
     * @expose
     */
    this.errorSourceAhead = 50;

    /**
     * Runtime defines.
     * @type {Array.<string>}
     */
    this.defines = [];
  }
function Preprocessor ( source , baseDirOrIncludes , preserveLineNumbers ) { /**
     * Source code to pre-process.
     * @type {string}
     * @expose
     */ this . source = '' + source ; /**
     * Source base directory.
     * @type {string}
     * @expose
     */ this . baseDir = typeof baseDirOrIncludes === 'string' ? baseDirOrIncludes : '.' ; /**
     * Included sources by filename.
     * @type {Object.<string, string>}
     */ this . includes = typeof baseDirOrIncludes === 'object' ? baseDirOrIncludes : { } ; /**
     * Preserve line numbers when removing blocks of code
     * @type {boolean}
     */ this . preserveLineNumbers = typeof preserveLineNumbers === 'boolean' ? preserveLineNumbers : false ; /**
     * Whether running inside of node.js or not.
     * @type {boolean}
     * @expose
     */ this . isNode = ( typeof window === 'undefined' || ! window . window ) && typeof require === 'function' ; /**
     * Error reporting source ahead length.
     * @type {number}
     * @expose
     */ this . errorSourceAhead = 50 ; /**
     * Runtime defines.
     * @type {Array.<string>}
     */ this . defines = [ ] ; }
Constructs a new Preprocessor.
@exports Preprocessor
@class Provides pre-processing of JavaScript source files, e.g. to build different versions of a library.
@param {string} source Source to process
@param {string|Object.<string,string>=} baseDirOrIncludes Source base directory used for includes (node.js only)
or an object containing all the included sources by filename. Defaults to the current working directory.
@param {boolean} preserveLineNumbers When removing blocks of code, replace the block with blank lines so that
line numbers are preserved, as long as #include is not used
@constructor
Constructs a new Preprocessor .