Skip to content

Commit

Permalink
fix: actually bundle ktlint binary
Browse files Browse the repository at this point in the history
Looks like a better "installation method", compared to
"download during install", which is rather slow.
  • Loading branch information
kirillgroshkov committed Dec 11, 2021
1 parent b662bd1 commit 566e724
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
"name": "@naturalcycles/ktlint",
"scripts": {
"prepare": "husky install",
"_postinstall": "node dist/install.js",
"_postinstall_disabled": "node dist/install.js",
"prepublishOnly": "pinst --enable",
"postpublish": "pinst --disable"
},
"dependencies": {
"got": "^11.0.0"
},
"dependencies": {},
"devDependencies": {
"@naturalcycles/dev-lib": "^12.14.2",
"@types/node": "^16.11.12",
"got": "^11.0.0",
"pinst": "^2.1.6"
},
"files": [
Expand Down
1 change: 0 additions & 1 deletion resources/.gitignore

This file was deleted.

Empty file removed resources/.gitkeep
Empty file.
Binary file added resources/ktlint
Binary file not shown.
1 change: 1 addition & 0 deletions src/install.ts → src/__exclude/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ void (async () => {
if (fs.existsSync(ktlintPath)) {
// const {size, mode} = fs.statSync(ktlintPath)
// return console.log(`ktlint exists, size: ${_hb(size)} mode ${mode}`)
// todo: check if installed version is the same!
return
}

Expand Down

0 comments on commit 566e724

Please sign in to comment.