Socket
Book a DemoInstallSign in
Socket

@xbl/notes-helper

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xbl/notes-helper

是使用 Nodejs 写的笔记小助手,在 Git 目录中自动同步到远端仓库的脚本工具

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

notes-helper

是使用 Nodejs 写的笔记小助手,在 Git 目录中自动同步到远端仓库的脚本工具

创建配置文件

在对应的 Git 目录中创建 .notes-helper.json

{
    "events": {
        "addDir": "touch .gitkeep && git add . && git commit -m 'notes add folder' && git push",
        "add": "git add . && git commit -m 'notes add file' && git push",
        "change": "git add . && git commit -m 'notes change file' && git push",
        "unlink": "git add . && git commit -m 'notes unlink' && git push"
    }
}

使用 chokidar 监听目录变化,监听变化事件产生执行对应的 shell 命令。

此处忽略了 git 初始化等操作。

执行 notes-helper 命令

方法一:使用 npx,在对应的目录执行如下命令

npx @xbl/notes-helper

方法二:全局安装

npm install -g @xbl/notes-helper

# 在对应目录执行
@xbl/notes-helper

FAQs

Package last updated on 31 Dec 2022

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