open-default
v1.0.0
Published
A simple wrapper script to open a file with the default application
Downloads
30
Maintainers
Readme
open-default
This is a simple wrapper script designed to open a file in the default application for each operating system.
It is particularly useful if you want to add a script to your package.json
for opening files.
Unlike other solutions, such as open-cli, this script is concise, consisting of only a few lines of code, and has no dependencies.
Installation
npm install open-default --save-dev
Usage
open-default <path>
Commands Used
The following commands are utilized to open a file based on the operating system:
| Operating System | Command |
|------------------|-------------|
| Windows | start
|
| macOS | open
|
| Linux | xdg-open
|
| FreeBSD | xdg-open
|
| OpenBSD | xdg-open
|