Skip to content

Commit

Permalink
Fix typo for loadAllModulesInDirectory method (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
lingyuncai authored Jun 21, 2024
1 parent a3eb00b commit 644b390
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion documentation/extensions/develop-an-extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ A Webinizer extension must have an ``index.ts`` in ``src`` folder which will hel
export default async function load() {
for (const md of moduleDirectories) {
await webinizer.loadAllModulesInDirctory(md);
await webinizer.loadAllModulesInDirectory(md);
}
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/webinizer-extension-demo/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ const moduleDirectories = [builderPath, advisorPath, actionPath];

export default async function load() {
for (const md of moduleDirectories) {
await webinizer.loadAllModulesInDirctory(md);
await webinizer.loadAllModulesInDirectory(md);
}
}
4 changes: 2 additions & 2 deletions src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function checkToolchainReadiness() {
}
}

export async function loadAllModulesInDirctory(dir: string) {
export async function loadAllModulesInDirectory(dir: string) {
try {
const modules = fs.readdirSync(dir);

Expand Down Expand Up @@ -81,7 +81,7 @@ export async function loadAllModulesInDirctory(dir: string) {
export async function init() {
await checkToolchainReadiness();
for (const md of moduleDirectories) {
await loadAllModulesInDirctory(md);
await loadAllModulesInDirectory(md);
}

await loadAllExtensions();
Expand Down
2 changes: 1 addition & 1 deletion src/webinizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Webinizer Extension APIs
*/

export { loadAllModulesInDirctory, init } from "./init";
export { loadAllModulesInDirectory, init } from "./init";

export { getLogger } from "./helper";

Expand Down
2 changes: 1 addition & 1 deletion typings/webinizer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ declare module "webinizer" {
* Initialize modules from directories.
* @param dir The directory for modules to load from.
*/
export function loadAllModulesInDirctory(dir: string): Promise<void>;
export function loadAllModulesInDirectory(dir: string): Promise<void>;

/**
* Create the logger object.
Expand Down

0 comments on commit 644b390

Please sign in to comment.