简体   繁体   中英

Can npm packages contain any programming language?

Say for instance you wanted to publish an npm package with bash scripts for certain tasks is that a.) allowed by npm package registry? and b.) is there a way to execute a bash script from within the logic of a specific javascript file? Maybe using child-processes or something like that?

well you can use exec() from child_process https://stackabuse.com/executing-shell-commands-with-node-js/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM