nit: I would have shared some more code between external and packaged apps
```
webappTargetDir.append(webappTargetDirName);
utils.ensureFolderExists(webappTargetDir);
if (utils.isExternalApp(app)) {
  var appSource = stageDir.clone();
  appSource.append(app.sourceDirectoryName);
  utils.moveExternalApp(app, appSource, webappTargetDir);
  return;
}
var targetManifest = webappTargetDir.clone();
targetManifest.append(WEBAPP_FILENAME);
```