Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove metrics analysis script #187

Merged
merged 1 commit into from
Apr 8, 2024
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
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ node_modules
dist
storybook-static
site/public
output
packages/metrics/scripts/googleFontsApi.json
packages/metrics/entireMetricsCollection/*
packages/unpack/src/weightings.ts
Expand Down
3 changes: 0 additions & 3 deletions packages/metrics/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@
/dist
/entireMetricsCollection
# end managed by crackle

# the analyse script dumps outputs in here
output
1 change: 0 additions & 1 deletion packages/metrics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"entireMetricsCollection"
],
"scripts": {
"analyse": "tsx ./scripts/analyse.ts",
"build": "crackle package",
"clean": "tsx ./scripts/clean.ts",
"dev": "crackle dev --shim=none",
Expand Down
82 changes: 0 additions & 82 deletions packages/metrics/scripts/analyse.ts

This file was deleted.

17 changes: 0 additions & 17 deletions packages/metrics/scripts/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ const buildFiles = async ({
progress.increment();
});

const metricsForAnalysis: MetricsFont[] = [];

await queue.addAll(
systemMetrics.map((m) => async () => await buildFiles(m as MetricsFont)),
);
Expand All @@ -160,26 +158,11 @@ const buildFiles = async ({
category: font.category as MetricsFont['category'],
});

metricsForAnalysis.push(m);
await buildFiles(m);
};
}),
);

await writeFile(
'googleFonts.json',
`${JSON.stringify(
metricsForAnalysis.sort((a, b) => {
const fontA = a.familyName.toUpperCase();
const fontB = b.familyName.toUpperCase();

return fontA < fontB ? -1 : fontA > fontB ? 1 : 0;
}),
null,
2,
)}\n`,
);

await writeFile(
'../src/entireMetricsCollection.json',
`${JSON.stringify(sortKeys(allMetrics), null, 2)}\n`,
Expand Down
Loading
Loading