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

duoms

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

duoms - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

61

bin/duoms.js
#!/usr/bin/env node
var fs = require("fs"),
path = process.cwd();
/**
DuoMS基础服务工具
By 贤心
*/
var fs = require("fs");
var package = require('../package');
var path = process.cwd();
var param = process.argv.slice(2); //获取参数
var Class = function(){
};
//简写
Class.prototype.short = {
'-h': 'help'
,'-v': 'version'
}
//版本号
Class.prototype.version = function(){
console.log('v'+ package.version);
};
//帮助
Class.prototype.help = function(){
var arr = [
'-h & 显示帮助'
,'-v & 查看版本号'
,'push & 提交文件到DuoMS'
,'auth [username] [password] & 验证用户'
];
console.log(arr.join('\n').replace(/\s&\s/g, ' '));
};
//版本号
Class.prototype.push = function(){
process.stdout.write('正在为您提交');
var timer = setInterval(function(){
process.stdout.write('-');
}, 10);
setTimeout(function(){
clearInterval(timer);
console.log('开发中');
}, 3000);
};
/*
var run= function (obj) {

@@ -22,3 +72,6 @@ if(obj[0] === '-v'){

};
//获取除第一个命令以后的参数,使用空格拆分
run(process.argv.slice(2));
*/
var duoms = new Class(), run = duoms.short[param[0]] || param[0];
param[0] ? (duoms[run] ? duoms[run]() : duoms.help()) : duoms.help();

4

package.json
{
"name": "duoms",
"version": "0.0.1",
"description": "剁手管理系统",
"version": "0.0.2",
"description": "剁手管理系统基础服务",
"main": "index.js",

@@ -6,0 +6,0 @@ "bin": { "duoms": "bin/duoms.js" },

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