2024-01-10 02:13:17 +01:00
|
|
|
require "bundler/setup"
|
2024-01-14 02:50:37 +01:00
|
|
|
load 'tasks/nanoc.rake'
|
2024-01-10 02:13:17 +01:00
|
|
|
namespace :schema do
|
|
|
|
desc "Generate src/js/types/schema.ts"
|
|
|
|
task :regen do
|
2024-02-18 00:41:35 +01:00
|
|
|
path = File.join "..", "twenty-server"
|
2024-01-10 02:13:17 +01:00
|
|
|
Bundler.with_unbundled_env {
|
|
|
|
Dir.chdir(path) { sh "bundle exec rake schema:regen" }
|
|
|
|
}
|
|
|
|
sh "npm exec graphql-codegen"
|
|
|
|
end
|
|
|
|
end
|