New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

synccode

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

synccode

同步代码命令行

  • 1.1.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

开发命令行工程步骤

  • npm init
  • 修改 package.json 文件,添加
"bin": {
    "syncCode": "./syncCode.js"
  },
  • syncCode.js 第一行一定是:
#!/usr/bin/env node
  • 安装: npm i -g
  • 测试: 运行 syncCode

其实就是运行了 nodejs syncCode.js

用法

工程根目录下必须有 rsync_exclude.txt 文件

用法有两种,一种指定参数,一种使用配置文件:

  • 指定参数: syncCode projectName serverName
  • 配置文件: 在项目根目录下新建 syncCode.json 文件,文件有上面两个配置项

脚本会根据 serverName 读取 ~/.ssh/config 文件,使用自动登录选项连接上远程服务器,并在远程服务器指定用户的根目录下创建 projectName 目录,并把当前工程文件上传,上传使用了 rsync 来上传,忽略的文件配置在当前工程的根目录的 rsync_exclude.txt

Keywords

FAQs

Package last updated on 07 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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