Skip to content

Commit

Permalink
Remove metrics analysis script (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltaranto authored Apr 8, 2024
1 parent 1e6d67f commit f2fdb95
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 30,150 deletions.
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

0 comments on commit f2fdb95

Please sign in to comment.