docs: function compile(srcPath, outPath) {
    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  
    if (options.debug) {
      console.log('\nBegin compile...', srcPath, outPath, options);
    }
  
    var files = getFiles(srcPath, true);
  
    var changedFiles = [];
  
    if (options.debug) {
      console.log('all files:', files);
    }
  
    files.forEach(function (file) {
      var srcFullPath = path.join(srcPath, file);
      var saveOutFullPathpath = path.join(outPath, file);
      var extname = path.extname(file);
  
      if (options.debug) {
        console.log('[' + extname + '] ' + srcFullPath + ' => ' + saveOutFullPathpath);
      }
  
      //if is not js file, only copy
      if (allowFileExt.indexOf(extname) === -1) {
        compileFile(srcFullPath, saveOutFullPathpath, true, options);
        return;
      }
  
      var mTime = fs.statSync(srcFullPath).mtime.getTime();
  
      if (fileUtil.isFile(saveOutFullPathpath)) {
        var outmTime = fs.statSync(saveOutFullPathpath).mtime.getTime();
  
        // if compiled file mtime is later than source file,
        // it means source file not modified, so there is no necessary to compile.
        if (outmTime >= mTime) {
          return;
        }
      }
  
      if (!compiledMtime[file] || mTime > compiledMtime[file]) {
        var ret = compileFile(srcFullPath, saveOutFullPathpath, false, options);
  
        if (ret) {
          changedFiles.push(saveOutFullPathpath);
        }
  
        compiledMtime[file] = mTime;
  
        var index = compiledErrorFiles.indexOf(file);
  
        if (ret) {
          if (index > -1) {
            compiledErrorFiles.splice(index, 1);
          }
        } else if (ret === false) {
          if (index === -1) {
            compiledErrorFiles.push(file);
          }
        }
      }
    });
  
    // console.error(compiledErrorFiles)
  }