1.0.0 • Published 2 years ago
open-default v1.0.0
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-devUsage
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 |
1.0.0
2 years ago