diff --git a/src/commands/docs.js b/src/commands/docs.js index f41494e..98769a8 100644 --- a/src/commands/docs.js +++ b/src/commands/docs.js @@ -11,9 +11,10 @@ var DOCS = { }; function openUrl(filePath) { - var cmd = process.platform === 'win32' - ? 'start "" "' + filePath + '"' - : 'xdg-open "' + filePath + '"'; + var cmd; + if (process.platform === 'win32') cmd = 'start "" "' + filePath + '"'; + else if (process.platform === 'darwin') cmd = 'open "' + filePath + '"'; + else cmd = 'xdg-open "' + filePath + '"'; exec(cmd, function (err) { if (err) { @@ -24,7 +25,7 @@ function openUrl(filePath) { }); } -function buildSelectionPage(javaPath, reactNativePath) { +function buildSelectionPage() { return `
@@ -93,8 +94,7 @@ function buildSelectionPage(javaPath, reactNativePath) { gap: 14px; padding: 18px 22px; border-radius: 12px; - border: none; - cursor: pointer; + text-decoration: none; font-weight: 600; font-size: 1rem; transition: transform 0.15s, box-shadow 0.15s; @@ -163,7 +163,7 @@ function buildSelectionPage(javaPath, reactNativePath) {Selecione abaixo qual documentação você deseja consultar.
@@ -240,7 +240,7 @@ function register(program) { process.exit(1); } - var html = buildSelectionPage(javaPath, reactNativePath); + var html = buildSelectionPage(); var tmpFile = path.join(platformDir, 'docs-selector.html'); fs.writeFileSync(tmpFile, html, 'utf8');