Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-shell-async

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-shell-async - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

dist/node-shell-async.js

12

examples/index.js

@@ -1,5 +0,11 @@

const NSH = require('../dist/node-sh');
const NSH = require('../dist/node-shell-async');
const sh = new NSH();
sh.date().then((data) => console.log(data));
sh.cal().then((data) => console.log(data));
// sh.date().then((data) => console.log(data));
// sh.cal().then((data) => console.log(data));
// sh.df().then((data) => console.log(data));
// sh.pwd().then((data) => console.log(data));
// sh.ls('-a').then((data) => console.log(data));
// sh.file('package.json').then((data) => console.log(data));
// sh.less('package.json').then((data) => console.log(data));
// sh.cp('./package.json', './package_back.json').then((data) => console.log(data));
{
"name": "node-shell-async",
"version": "0.0.1",
"description": "Node Shell",
"main": "src/lib/node-sh.js",
"version": "0.0.2",
"description": "Node Shell Asynch",
"main": "src/lib/node-shell-async.js",
"scripts": {

@@ -12,7 +12,8 @@ "dev": "NODE_ENV=development ./node_modules/.bin/rollup -w -c",

"type": "git",
"url": "git+https://github.com/LeeHyungGeun/node-sh.git"
"url": "git+https://github.com/LeeHyungGeun/node-shell-async.git"
},
"keywords": [
"shell",
"node-shell"
"node-shell",
"node-shell-async"
],

@@ -22,5 +23,5 @@ "author": "LeeHyungGeun <lhg4031@gmail.com>",

"bugs": {
"url": "https://github.com/LeeHyungGeun/node-sh/issues"
"url": "https://github.com/LeeHyungGeun/node-shell-async/issues"
},
"homepage": "https://github.com/LeeHyungGeun/node-sh#readme",
"homepage": "https://github.com/LeeHyungGeun/node-shell-async#readme",
"devDependencies": {

@@ -27,0 +28,0 @@ "@babel/cli": "^7.4.4",

@@ -1,8 +0,42 @@

# Node Shell
# Node Shell Async
You can use shell command in Node.js
## Getting Started
install
#### Install
``` bash
$ npm i --save node-shell-async
```
$ npm i --save node-sh
```
#### Usage
``` javascript
const NSH = require('node-shell-script');
const nsh = new NSH();
nsh.date().then((data) => console.log(data));
/// 2019년 10월 9일 수요일 14시 40분 20초 KST
```
## API
- date
- show current date and time
- cal
- show calendar with current date
- df
- show disk information and available storage
- pwd (Print Working Directory)
- show curent working directory
- ls
- show file and sub directories of current directory
- file
- show file type
- less
- show file content as text of ASCII typew
/* File System */
- cp
- copy file
## TODO
- free
- show memory information
- command not found

@@ -9,3 +9,3 @@ // Rollup plugins

const pkgName = 'node-sh'
const pkgName = 'node-shell-async'
const pkg = {

@@ -20,5 +20,8 @@ all: `dist/${pkgName}.js`,

{
input: 'src/lib/node-sh.js',
input: 'src/lib/node-shell-async.js',
// external: [
// 'node-cmd'
// ],
output: {
name: 'nodeShell',
name: 'nodeShellAsync',
// file: pkg.browser,

@@ -45,2 +48,3 @@ file: pkg.all,

browser: true,
preferBuiltins: true, // Disable warning for over local alternative at 'child_process'
}),

@@ -89,3 +93,3 @@ commonjs(),

// {
// input: 'src/lib/node-sh.js',
// input: 'src/lib/node-shell-async.js',
// // external: [],

@@ -92,0 +96,0 @@ // output: [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc