Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add schema.json to npm packages #928

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ packaging/npm-bundled/bin/
packaging/npm-*/README.md
packaging/npm/*/bin/
packaging/npm/*/README.md
packaging/npm/*/schema.json
packaging/npm-bundled/schema.json
packaging/npm-installer/schema.json
!packaging/npm/*/package.json
!packaging/npm/lefthook/bin/index.js
3 changes: 3 additions & 0 deletions packaging/npm-bundled/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "1.10.5",
"description": "Simple git hooks manager",
"main": "bin/index.js",
"files": [
"schema.json"
],
"bin": {
"lefthook": "bin/index.js"
},
Expand Down
3 changes: 3 additions & 0 deletions packaging/npm-installer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "1.10.5",
"description": "Simple git hooks manager",
"main": "bin/index.js",
"files": [
"schema.json"
],
"bin": {
"lefthook": "bin/index.js"
},
Expand Down
3 changes: 3 additions & 0 deletions packaging/npm/lefthook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"url": "git+https://github.com/evilmartians/lefthook.git"
},
"main": "bin/index.js",
"files": [
"schema.json"
],
"bin": {
"lefthook": "bin/index.js"
},
Expand Down
11 changes: 8 additions & 3 deletions packaging/pack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module Pack
def prepare
clean
set_version
put_readme
put_additional_files
put_binaries
end

Expand All @@ -43,14 +43,19 @@ def set_version
replace_in_file("aur/PKGBUILD", /(pkgver+=).*/, %{\\1#{VERSION}})
end

def put_readme
def put_additional_files
cd(__dir__)
puts "Putting READMEs... "
puts "Putting README... "
Dir["npm/*"].each do |npm_dir|
cp(File.join(ROOT, "README.md"), File.join(npm_dir, "README.md"), verbose: true)
end
cp(File.join(ROOT, "README.md"), "npm-bundled/", verbose: true)
cp(File.join(ROOT, "README.md"), "npm-installer/", verbose: true)

puts "Putting schema.json..."
cp(File.join(ROOT, "schema.json"), "npm/lefthook/", verbose: true)
cp(File.join(ROOT, "schema.json"), "npm-bundled/", verbose: true)
cp(File.join(ROOT, "schema.json"), "npm-installer/", verbose: true)
puts "done"
end

Expand Down
Loading