Skip to content

Commit

Permalink
Better output message for multi-browser runs
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Aug 22, 2024
1 parent fbfd99a commit cd47ddc
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions programs/develop/plugin-browsers/browsers-lib/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export function browserNotInstalled(
export function creatingUserProfile(browser: DevOptions['browser']) {
const browsername = capitalizedBrowserName(browser)
return (
`${getLoggingPrefix(browser, 'info')} Creating ${browsername} ` +
`user profile directory...`
`${getLoggingPrefix(browser, 'info')} Creating new ${browsername} ` +
`user profile...`
)
}

Expand Down
11 changes: 8 additions & 3 deletions programs/develop/plugin-browsers/run-chromium/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,14 @@ export class RunChromiumPlugin {

this.launchChromium(this.browser)

console.log(
messages.stdoutData(this.browser, compilation.compilation.options.mode)
)
setTimeout(() => {
console.log(
messages.stdoutData(
this.browser,
compilation.compilation.options.mode
)
)
}, 2000)

chromiumDidLaunch = true
done()
Expand Down
16 changes: 9 additions & 7 deletions programs/develop/plugin-browsers/run-firefox/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,17 @@ export class RunFirefoxPlugin {
return
}

setTimeout(() => {
console.log(
messages.stdoutData(
this.browser,
compilation.compilation.options.mode
)
)
}, 2000)

await this.launchFirefox(compiler)

console.log(
messages.stdoutData(
// extensionManifest.name,
this.browser,
compilation.compilation.options.mode
)
)
firefoxDidLaunch = true
done()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {createFirefoxAddonsTab, handleFirstRun} from './define-initial-tab.js'
import {handleFirstRun} from './define-initial-tab.js'
import {connect, disconnect} from './reload-service.js'

function bgGreen(str) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ export async function startServer(compiler: Compiler, options: DevOptions) {
path.join(projectPath, 'manifest.json')
)

setTimeout(() => {
console.log(messages.runningInDevelopment(manifest, message))
console.log('')
}, 2500)
console.log(messages.runningInDevelopment(manifest, message))
console.log('')

if (isFirstRun(options.browser)) {
setTimeout(() => {
Expand Down

0 comments on commit cd47ddc

Please sign in to comment.