Skip to content
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
8 changes: 8 additions & 0 deletions backends/indexer/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Creates an index of the database using JSON Reference.

== Tasks

[source,bash]
----
./do gen:index # writes index to ROOT/gen/indexer/index-unifieddb.json
----
File renamed without changes.
13 changes: 13 additions & 0 deletions backends/indexer/tasks.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

require "pathname"

namespace :gen do
desc "Generate index of the database"
task :index do
index_path = Pathname.new("#{$root}/gen/indexer/index-unified.json")
Dir.chdir "#{$root}/backends/indexer" do
FileUtils.mkdir_p index_path.dirname
File.write index_path, `node index-unifieddb.js #{$root}`
end
end
end
6 changes: 6 additions & 0 deletions bin/node
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

ROOT=$(dirname $(realpath $BASH_SOURCE[0]))
source $ROOT/setup

$NODE "$@"
1 change: 1 addition & 0 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,4 @@ RUBY="singularity run ${HOME_OPT} ${CONTAINER_PATH} bundle exec ruby"
RAKE="singularity run ${HOME_OPT} ${CONTAINER_PATH} bundle exec rake"
NPM="singularity run ${HOME_OPT} ${CONTAINER_PATH} npm"
NPX="singularity run ${HOME_OPT} ${CONTAINER_PATH} npx"
NODE="singularity run ${HOME_OPT} ${CONTAINER_PATH} node"
Loading