code: function exportToJDL(jdl, path) {
    if (!jdl) {
      throw new Error('A JDLObject has to be passed to be exported.');
    }
    if (!path) {
      path = './jhipster-jdl.jh';
    }
    fs.writeFileSync(path, jdl.toString());
  }
docs: Writes down the given JDL to a file.
  @param jdl the JDL to write.
  @param path the path where the file will be written.