Closed n-d-r-d-g closed 2 months ago
Yes, anything .js
can be .json + .ts
would improve the DX a great deal!
you can test if this break anything by building the website using pnpm nuxt generate
@MrSunshyne alright, @k3ii thought of splitting .json & .ts files in separate directories and creating a script to convert .json to .ts.
@k3ii All .json files in the data
directory contain arrays, except for photos-raw.json
. This one needs to be converted slightly differently. We can look into this together.
@MrSunshyne alright, @k3ii thought of splitting .json & .ts files in separate directories and creating a script to convert .json to .ts.
@k3ii All .json files in the
data
directory contain arrays, except forphotos-raw.json
. This one needs to be converted slightly differently. We can look into this together.
@n-d-r-d-g do we do the work in this PR or we get this one merge and work on another PR?
@MrSunshyne alright, @k3ii thought of splitting .json & .ts files in separate directories and creating a script to convert .json to .ts. @k3ii All .json files in the
data
directory contain arrays, except forphotos-raw.json
. This one needs to be converted slightly differently. We can look into this together.@n-d-r-d-g do we do the work in this PR or we get this one merge and work on another PR?
@k3ii Yeah maybe it's a better idea to merge this one then. Let's work on another PR for the other changes.
@MrSunshyne could you please merge this one? We'll get rid of the unmaintainable code in the next PR.
Hi @MrSunshyne,
@k3ii assisted me in generating a
.ts
file for featured-issues.json so we can extract the literal types from it.What do you think about converting all the other .json files in the same directory to .ts as well?
P.S. There are some .js files as well in the directory. I think we need to convert them to .json & .ts as well.