obaydmerz / powerjs Goto Github PK
View Code? Open in Web Editor NEWDo the powershell magic... right from your script!
License: MIT License
Do the powershell magic... right from your script!
License: MIT License
Hello,
I'm trying to build an electron app that runs powershell commands underneath.
When I'm initializing a PowerJS instance I get the following error
node_child_process is not defined
This may not be desirable as a user profile could add a long delay to starting the shell.
Consider adding a noProfile
option to add -noProfile
as an argument to spawning the shell.
child_process:spawn does not throw any error directly as it forks a process
Instead, errors are emitted and need to be listened to.
error
is emitted on errors, and spawn
on success.
https://nodejs.org/api/child_process.html#event-error
As such, only the first element of additionalShellNames is considered.
Workaround for vanilla windows without PowerShell-7:
const psOptions = {
additionalShellNames: ['powershell'],
extensions: [],
dlls: {}
};
const ps = new PowerJS(psOptions);
Please consider using a different license for this great product!
First and foremost, this is a library which is designed to be used by other applications.
I would love to use this in my closed source Electron application, but neither the GPL nor LGPL would allow this.
Please consider any of the BSD, ISC, MIT or Apache licenses as used by the vast majority of the NPM world.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.