New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cross-start

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cross-start

Allows you to define different npm start commands per OS

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

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-start

or

yarn add cross-start --dev

if 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:aix
  • start:darwin
  • start:freebsd
  • start:linux
  • start:openbsd
  • start:sunos
  • start:win32

Keywords

cross-environment

FAQs

Package last updated on 31 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts