node-shell-async
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17482
10
278
42
2