mirror of
https://github.com/zhigang1992/firebase-tools.git
synced 2026-01-12 09:04:01 +08:00
* Add emulator:run * Cleanup * Download emulators if needed * Cleanup * Remove unused dep * Use CACHE_DIR * Allow FIREBASE_EMULATORS_PATH to override the cache dir * Format * Simplify emulator remote storage * Use fs-extra * Hide emulator:run behind preview * Cleanup * Fix URL * Remove old commands * Point at real artifacts * make emulators executable after downloading * Allow --yes flag for emulator * Prompt for emulator download * Linter * Emulator CLI per API Review (#318) * Emulator CLI per API Review * Cleanup * Address comments * Linter * Add a useful error message for when the emulator cannot start because… (#329) * Add a useful error message for when the emulator cannot start because Java is not installed * linter * action item * Add start time to profiler dump (#323) * Set emulator version for initial release (#336) * Typescript (#338) * The path structure layout seems like it changed (#341) * The path structure layout seems like it changed * Update src/auth.js Co-Authored-By: ryanpbrewster <RyanPBrewster@gmail.com> * Update functions init templates to v2.1.0 (#969) (#343)
17 lines
422 B
JavaScript
17 lines
422 B
JavaScript
"use strict";
|
|
|
|
var fsutils = require("./fsutils");
|
|
var path = require("path");
|
|
|
|
module.exports = function(cwd) {
|
|
var projectRootDir = cwd || process.cwd();
|
|
while (!fsutils.fileExistsSync(path.resolve(projectRootDir, "./firebase.json"))) {
|
|
var parentDir = path.dirname(projectRootDir);
|
|
if (parentDir === projectRootDir) {
|
|
return null;
|
|
}
|
|
projectRootDir = parentDir;
|
|
}
|
|
return projectRootDir;
|
|
};
|