Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Fix the project CLI flag #1774

Merged
merged 8 commits into from
Aug 19, 2021
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions src/js/lib/content/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -955,20 +955,25 @@ API.main = async function(inputConfig: any) {
config.updateFromObject(inputConfig)
config.updateFromObject(urlConfig)

const runEntryPoint = async () => {
4e6 marked this conversation as resolved.
Show resolved Hide resolved
if (ok(config.project)) {
await mainEntryPoint(config)
} else {
await templates.loadTemplatesView((name: string) => {
config.project = name
mainEntryPoint(config)
})
}
}

if (await checkMinSupportedVersion(config)) {
if (config.authentication_enabled && !Versions.isDevVersion()) {
new FirebaseAuthentication(function(user: any) {
config.email = user.email
templates.loadTemplatesView((name: string) => {
config.project = name
mainEntryPoint(config)
})
runEntryPoint()
})
} else {
await templates.loadTemplatesView((name: string) => {
config.project = name
mainEntryPoint(config)
})
await runEntryPoint()
}
} else {
// Display a message asking to update the application.
Expand Down