mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-29 15:51:12 +00:00
Update copy_types script.
This commit is contained in:
parent
c758d480dc
commit
ea0c112520
1 changed files with 10 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# First re-generate the types by running cargo test on lemmy
|
||||
cd ../lemmy/scripts
|
||||
pushd ../lemmy/scripts
|
||||
./test.sh
|
||||
|
||||
cd ../crates
|
||||
|
@ -13,7 +13,13 @@ cp db_views/bindings/* ../../lemmy-js-client/src/types/
|
|||
cp db_views_actor/bindings/* ../../lemmy-js-client/src/types/
|
||||
cp db_views_moderator/bindings/* ../../lemmy-js-client/src/types/
|
||||
|
||||
# Change all the bigints to numbers
|
||||
find ../../lemmy-js-client/src/types -type f -name '*.ts' -exec sed -i 's/bigint/number/g' {} +
|
||||
popd
|
||||
|
||||
# Remove the Sensitive type
|
||||
rm src/types/Sensitive.ts
|
||||
|
||||
# Change all the bigints to numbers
|
||||
find src/types -type f -name '*.ts' -exec sed -i 's/bigint/number/g' {} +
|
||||
|
||||
node putTypesInIndex.js
|
||||
|
||||
node ../../lemmy-js-client/putTypesInIndex.js
|
||||
|
|
Loading…
Reference in a new issue