1.0.4 • Published 5 years ago
cross-start v1.0.4
cross-start
Run different npm start commands per platform.
Description
Do you need to start a .bat script on windows in order to launch your application? And on linux, you need to start a bash-script? Then just let cross-start handle to call the correct startup command, and you can continue to use the simple npm start command to launch your application.
Installation
Install this module via
npm install --save-dev cross-startor
yarn add cross-start --devif you use yarn.
Usage
Replace your default start command with cross-start:
{
"scripts": {
"start": "cross-start"
}
}Next, add a start command for each platform you wish to run your project on:
{
"scripts": {
"start": "cross-start",
"start:win32": "cmd my\\startup\\script.bat",
"start:linux": "bash my/startup/script.sh"
}
}Your script name must starts with start: and ends with one of the supported platforms by node.js.
List of valid task names:
start:aixstart:darwinstart:freebsdstart:linuxstart:openbsdstart:sunosstart:win32