cli/download.js
function downloadCode(db, codePath) {
  return mkdir(codePath)
    .then(() => db.code.loadModules())
    .then((modules) => Promise.all(modules.map(module => downloadCodeModule(db, module, codePath))));
}
function downloadCode(db, codePath) {
  return mkdir(codePath)
    .then(() => db.code.loadModules())
    .then((modules) => Promise.all(modules.map(module => downloadCodeModule(db, module, codePath))));
}
function downloadCode ( db , codePath ) { return mkdir ( codePath ) . then ( ( ) => db . code . loadModules ( ) ) . then ( ( modules ) => Promise . all ( modules . map ( module => downloadCodeModule ( db , module , codePath ) ) ) ) ; }
Download all Baqend code.

@param {EntityManager} db The entity manager to use.
@param {string} codePath The path where code should be downloaded to.
@return {Promise<void>} Resolves when downloading has been finished.
Download all Baqend code .