Skip to content

Commit

Permalink
fix: change output file extension to .json (#6)
Browse files Browse the repository at this point in the history
* change output file extension

* Update README.md

* chore: .json -> .txt

---------

Co-authored-by: Tristan F <[email protected]>
  • Loading branch information
ShenQingchuan and LeoDog896 authored Sep 4, 2023
1 parent 41aa7f3 commit 1ece985
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ jobs:
prerelease: true
title: "NPM Ranking"
files: |
raw.txt
raw.json
LICENSE
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
raw.txt
raw.json
src/PACKAGES.md
book
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ https://leodog896.github.io/npm-rank/PACKAGES.html

The raw data is available in
[releases](https://github.com/LeoDog896/npm-rank/releases) as
[json](https://github.com/LeoDog896/npm-rank/releases/download/latest/raw.txt).
[json](https://github.com/LeoDog896/npm-rank/releases/download/latest/raw.json).
4 changes: 2 additions & 2 deletions scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if (packages.length !== 10000) {
console.log(`Fetched an extra ${objects.length} packages.`);
}

await Deno.writeTextFile("./raw.txt", JSON.stringify(packages));
await Deno.writeTextFile("./raw.json", JSON.stringify(packages));

function optionallyFormat(arg: string | undefined, label: string): string {
if (!arg) {
Expand Down Expand Up @@ -139,5 +139,5 @@ console.assert(
);

console.log(
`Wrote ${packages.length} packages to ./raw.txt and ./src/PACKAGES.md.`,
`Wrote ${packages.length} packages to ./raw.json and ./src/PACKAGES.md.`,
);

0 comments on commit 1ece985

Please sign in to comment.