Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saintedlama/wrap-cmd
https://github.com/saintedlama/wrap-cmd
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/saintedlama/wrap-cmd
- Owner: saintedlama
- Created: 2015-12-01T16:20:30.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-04T09:25:40.000Z (almost 9 years ago)
- Last Synced: 2024-11-12T05:41:39.289Z (2 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wrap-cmd
Minimal node module only useful on windows to create wrapper .cmd scripts
to wrap node scripts into executable .cmd files.## Installation
npm i wrap-cmd -g## Usage
```
Usage: wrap-cmd [options] SCRIPTFILEOptions:
-r Use a relative script file location. Instead of an absolute path to SCRIPTFILE %~dp0 is used
Example:
wrap-cmd line_count.js outputs a cmd file to execute line_count.js from a windows cmd
```Output
> node bin.js bin.js -r
```
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\bin.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\bin.js" %*
)
```