code: protected void processDirectory(File input, File destination) throws WatchingException {
          if (! input.isDirectory()) {
              return;
          }
  
          if (! destination.isDirectory()) {
              destination.mkdirs();
          }
  
          // Now execute the compiler
          // We compute the set of argument according to the Mojo's configuration.
          try {
              Collection<File> files = FileUtils.listFiles(input, new String[]{"ts"}, true);
              if (files.isEmpty()) {
                  return;
              }
  
              List<String> arguments = typescript.createTypeScriptCompilerArgumentList(input, destination, files);
              getLog().info("Invoking the TypeScript compiler with " + arguments);
              npm.registerOutputStream(true);
              int exit = npm.execute(TYPE_SCRIPT_COMMAND,
                      arguments.toArray(new String[arguments.size()]));
              getLog().debug("TypeScript Compiler execution exiting with status: " + exit);
          } catch (MojoExecutionException e) {
              // If the NPM execution has caught an error stream, try to create the associated watching exception.
              if (!Strings.isNullOrEmpty(npm.getLastOutputStream())) {
                  throw build(npm.getLastOutputStream());
              } else {
                  throw new WatchingException(ERROR_TITLE, "Error while compiling " + input
                          .getAbsolutePath(), input, e);
              }
          }
      }
docs: Process all typescripts file from the given directory. Output files are generated in the given destination.
  
  @param input       the input directory
  @param destination the output directory
  @throws WatchingException if the compilation failed