Package Exports
- polyshell
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (polyshell) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
polyshell

Combines Microsoft Windows and POSIX, shell scripts into a single cross platform script
Installation
As a module
npm install polyshell --saveAs a program
npm install polyshell -gUsage
As a module
var fs = require('fs');
var polyshell = require('polyshell');
var polyshellStream = polyshell(fs.createFileStream('script.bat'), fs.createFileStream('script.sh'));
polyshellStream.pipe(fs.createWriteStream('script.cmd'));As a program
polyshell script.bat script.sh > script.cmdExample
hello.bat
@echo off
echo Hellohello.sh
#!/bin/sh
echo Hellopolyshell hello.bat hello.sh > hello.cmdOn Windows
c:\project>hello.cmd
Hello
c:\project>On Linux/Unix/OSX etc
user$ chmod +x hello.cmd
user$ ./hello.cmd
Hello
user$ Limitations
To run on as many systems as possible, the Windows script should be a Batch file, and the POSIX script should be a Bourne shell file.
When executing on POSIX systems, the script will run uisng the default shell. This is almost always the Bourne shell, however there is no guarantee that the default has not been changed!