{"_id":"@antitoxic/mac-openchrometab","name":"@antitoxic/mac-openchrometab","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@antitoxic/mac-openchrometab","version":"1.0.0","license":"MIT","author":{"name":"Anton Stoychev"},"description":"Opens URL in chrome, reusing tab if present","repository":{"type":"git","url":"git+https://github.com/antitoxic/mac-openchrometab.git"},"main":"./lib/index.js","devDependencies":{"@jxa/types":"^1.3.6","@tsconfig/node18":"^18.2.0","@tsconfig/strictest":"^2.0.1","concurrently":"^8.2.0","esbuild":"^0.18.11","typescript":"^5.1.6"},"scripts":{"start":"concurrently --names \"tsc,esbuild\" --prefix-colors \"blue,yellow\" \"pnpm start:node\" \"pnpm start:jxa\"","start:node":"pnpm build:node --watch --preserveWatchOutput","start:jxa":"find src/jxa -type f -exec pnpm esbuild:jxa --watch \"{}\" + ;","build":"concurrently --names \"tsc,esbuild\" --prefix-colors \"blue,yellow\" \"pnpm build:node\" \"pnpm build:jxa\"","build:node":"tsc --project ./tsconfig.node.build.json","build:jxa":"find src/jxa -type f -exec pnpm esbuild:jxa {} + ;","esbuild:jxa":"esbuild --target=node8 --bundle --outdir=lib/jxa"},"bugs":{"url":"https://github.com/antitoxic/mac-openchrometab/issues"},"homepage":"https://github.com/antitoxic/mac-openchrometab#readme","_id":"@antitoxic/mac-openchrometab@1.0.0","_integrity":"sha512-cF1jHZkVVCJSiiSUcZPeNe02p2OtdDoT+u1bWT+RYleXU+wf7nJbA+0ygPNho6/tm3npMGjiH4qqsaCRQbh8wA==","_resolved":"/private/var/folders/bj/x94r4xlx6nq__83ld20n3v2w0000gn/T/b05870ff35f26b38a978e4647ca93c29/antitoxic-mac-openchrometab-1.0.0.tgz","_from":"file:antitoxic-mac-openchrometab-1.0.0.tgz","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-cF1jHZkVVCJSiiSUcZPeNe02p2OtdDoT+u1bWT+RYleXU+wf7nJbA+0ygPNho6/tm3npMGjiH4qqsaCRQbh8wA==","shasum":"2c5fd672dd102611f79f9b91fd5c13dd0c7488aa","tarball":"https://registry.npmjs.org/@antitoxic/mac-openchrometab/-/mac-openchrometab-1.0.0.tgz","fileCount":7,"unpackedSize":5484,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxYnjBDEjEbRCaC4mE8mlZqVE2mXq9xMjjqaasQCVIjQIhAKG9v/ra7ACmzG9zV76Xjxa7BEd1tDF54SzPHBjlQuRI"}]},"_npmUser":{"name":"antitoxic","email":"anton@stoychev.art"},"directories":{},"maintainers":[{"name":"antitoxic","email":"anton@stoychev.art"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mac-openchrometab_1.0.0_1689013275635_0.826997084935235"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-10T18:21:15.555Z","1.0.0":"2023-07-10T18:21:15.887Z","modified":"2023-07-10T18:21:16.209Z"},"maintainers":[{"name":"antitoxic","email":"anton@stoychev.art"}],"description":"Opens URL in chrome, reusing tab if present","homepage":"https://github.com/antitoxic/mac-openchrometab#readme","repository":{"type":"git","url":"git+https://github.com/antitoxic/mac-openchrometab.git"},"author":{"name":"Anton Stoychev"},"bugs":{"url":"https://github.com/antitoxic/mac-openchrometab/issues"},"license":"MIT","readme":"# `@antitoxic/mac-openchrometab`\n\n- `npm` package which offers a single function called `openChromeTab`\n- `openChromeTab` opens a URL in `Google Chrome` (_or other Chromium\n  alternative_), reusing tab if present\n- if tab is not opened already, it will attempt to load the URL in a tab which\n  is blank (`about:blank`) or create a new tab\n- if `Google Chrome` is not running, it will start it\n- if `Google Chrome` window is unfocused or minimized, it will respectively\n  focus & un-minimize\n\nTo make work, this package uses a\n[`JXA`](https://developer.apple.com/library/archive/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/Articles/Introduction.html#//apple_r 'JavaScript for Automation')\nscript written in `TypeScript`. Even though `JXA` is outdated and unsupported\n`JavaScript`, the `TypeScript` offers more familiar development environment than\nthe usual `AppleScript` used for automating mac.\n\n## Usage\n\n```ts\nimport { openChromeTab } from '@antitoxic/mac-openchrometab';\n//...\nopenChromeTab('http://localhost:8080');\n```\n\n## Use cases\n\n- During active web development, you can automatically open or reuse already\n  opened tab\n- Writing scripts to focus on specific tab you know the url of.\n","readmeFilename":"README.md"}