NodeJS v16.x下安装nodegit

This commit is contained in:
msojocs 2022-02-12 21:05:17 +08:00
parent 0c3f52f1d6
commit 5c542ed484
3 changed files with 29 additions and 2 deletions

3
.gitignore vendored
View File

@ -8,4 +8,5 @@ mew/
node_modules
test/mini-ci
crash-server
build
build
*.snap

27
docs/Nodegit.MD Normal file
View File

@ -0,0 +1,27 @@
NodeJS v16.x下安装nodegit
1. `apt-get install -y python2 python3 libkrb5-dev gcc openssl libssh2-1-dev g++ make`
2. `npm install nodegit`
## docker-compose.yaml
```yaml
version: "3"
services:
wechat_devtools:
image: node:16.13.1-slim
volumes:
- .:/workspace
entrypoint: /workspace/docker/entrypoint
```
## entrypoint
```bash
#!/bin/bash
cd /workspace
apt update
apt-get install -y python2 python3 libkrb5-dev gcc openssl libssh2-1-dev g++ make
echo "start"
npm install nodegit --registry=https://registry.npm.taobao.org
npm uninstall nodegit
```

View File

@ -1,7 +1,6 @@
#!/usr/bin/env node
const path = require("path");
const fs = require("fs");
const { spawn } = require("child_process");
console.info("Patching CLI command");