Skip to content

Commit

Permalink
Remove rimraf dependency (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Apr 3, 2023
1 parent c45ccfe commit 4d85c73
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 15 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [14.13.1, 16, 18]
node:
- '14.14.0'
- 16
- 18

steps:
- name: Clone repository
Expand Down
5 changes: 5 additions & 0 deletions lib/install.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { rm } from 'node:fs/promises';
import path from 'node:path';
import process from 'node:process';
import hugoBin from './index.js';
Expand All @@ -24,6 +25,10 @@ function getProjectRoot() {

async function main() {
const projectRoot = getProjectRoot();
const vendorDir = path.join(projectRoot, './vendor');

await rm(vendorDir, { force: true, recursive: true });

const bin = await hugoBin(projectRoot);

bin.run(['version']).then(() => {
Expand Down
37 changes: 27 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
},
"dependencies": {
"@xhmikosr/bin-wrapper": "^5.0.1",
"pkg-conf": "^4.0.0",
"rimraf": "^3.0.2"
"pkg-conf": "^4.0.0"
},
"devDependencies": {
"bin-check": "^4.1.0",
Expand All @@ -44,14 +43,14 @@
"fix": "npm run lint -- --fix",
"uvu": "uvu test",
"test": "npm run lint && npm run uvu",
"postinstall": "rimraf vendor && node lib/install.js"
"postinstall": "node lib/install.js"
},
"files": [
"lib/*.js",
"cli.js",
"index.js"
],
"engines": {
"node": "^14.13.1 || >=16.0.0"
"node": "^14.14.0 || >=16.0.0"
}
}

0 comments on commit 4d85c73

Please sign in to comment.