mirror of
https://github.com/matheus23/elmjs-inspect.git
synced 2024-08-16 06:40:22 +03:00
Fix ALL the spelling
This commit is contained in:
parent
b07ab48f56
commit
693f02f4ec
@ -70,7 +70,7 @@ function localName(name: string) {
|
||||
: name.slice(16, name.lastIndexOf("$")).replaceAll("$", ".");
|
||||
}
|
||||
|
||||
export async function analyse(elmOutputJsFilePath: string, opts: any) {
|
||||
export async function analyze(elmOutputJsFilePath: string, opts: any) {
|
||||
const file = await promisify(FS.readFile)(elmOutputJsFilePath);
|
||||
const parsed = Esprima.parseScript(file.toString(), { range: true });
|
||||
const size = parsed.range;
|
||||
@ -114,7 +114,7 @@ export async function analyse(elmOutputJsFilePath: string, opts: any) {
|
||||
.map(({ range }) => rangeSize(range))
|
||||
.reduce((a, b) => a + b, 0);
|
||||
Console.log(
|
||||
`Range sum: ${rangeSum} total: ${rangeSize(size)}, analized ${pct(
|
||||
`Range sum: ${rangeSum} total: ${rangeSize(size)}, analyzed ${pct(
|
||||
rangeSum,
|
||||
rangeSize(size)
|
||||
)}`
|
@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { program } from "commander";
|
||||
import { analyse } from "./analyse.js";
|
||||
import { analyze } from "./analyze.js";
|
||||
|
||||
program
|
||||
.name("elmjs-inspector")
|
||||
.description("Analyse your elm.js file size with this tool.")
|
||||
.name("elmjs-inspect")
|
||||
.description("Analyze your elm.js file size with this tool.")
|
||||
.version("1.0.0");
|
||||
|
||||
program
|
||||
@ -15,7 +15,7 @@ program
|
||||
)
|
||||
.argument("<filename>", "The file to analyze")
|
||||
.action((filename, opts) => {
|
||||
analyse(filename, opts);
|
||||
analyze(filename, opts);
|
||||
});
|
||||
|
||||
program.parse();
|
||||
|
@ -7,5 +7,5 @@
|
||||
"outDir": "bin",
|
||||
"lib": ["ES2021.String"]
|
||||
},
|
||||
"files": ["src/analyse.ts", "src/index.ts"]
|
||||
"files": ["src/analyze.ts", "src/index.ts"]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user