From 70f25f59875d466b4a099878d7174e7d85960f70 Mon Sep 17 00:00:00 2001 From: Eden Wang Date: Wed, 29 Nov 2023 09:34:06 +0800 Subject: [PATCH] fix: typo for pedno to pendo (#90) --- projects/ngx-pendo/schematics/ng-add/index.spec.ts | 8 ++++---- projects/ngx-pendo/schematics/ng-add/index.ts | 6 +++--- projects/ngx-pendo/schematics/ng-add/schema.d.ts | 4 ++-- projects/ngx-pendo/schematics/ng-add/schema.json | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/projects/ngx-pendo/schematics/ng-add/index.spec.ts b/projects/ngx-pendo/schematics/ng-add/index.spec.ts index 760b3aa..71c2ae4 100644 --- a/projects/ngx-pendo/schematics/ng-add/index.spec.ts +++ b/projects/ngx-pendo/schematics/ng-add/index.spec.ts @@ -6,7 +6,7 @@ import { Schema as WorkspaceOptions } from '@schematics/angular/workspace/schema const collectionPath = path.join(__dirname, '../collection.json'); -describe('ng add ngx pedno', () => { +describe('ng add ngx pendo', () => { const runner = new SchematicTestRunner('schematics', collectionPath); const workspaceOptions: WorkspaceOptions = { name: 'workspace', @@ -14,7 +14,7 @@ describe('ng add ngx pedno', () => { version: '0.0.1' }; const appOptions: ApplicationOptions = { - name: 'ngx-pedno', + name: 'ngx-pendo', inlineStyle: false, inlineTemplate: false, routing: false, @@ -30,9 +30,9 @@ describe('ng add ngx pedno', () => { }); it('add NgxPendoModule in angular project', async () => { - const options = { project: 'ngx-pedno', pendoApiKey: 'test1' }; + const options = { project: 'ngx-pendo', pendoApiKey: 'test1' }; const tree = await runner.runSchematic('ng-add', options, appTree); - const appmodule = tree.readContent('/projects/ngx-pedno/src/app/app.module.ts'); + const appmodule = tree.readContent('/projects/ngx-pendo/src/app/app.module.ts'); console.log(appmodule); }); }); diff --git a/projects/ngx-pendo/schematics/ng-add/index.ts b/projects/ngx-pendo/schematics/ng-add/index.ts index f6a23c0..7c1e351 100644 --- a/projects/ngx-pendo/schematics/ng-add/index.ts +++ b/projects/ngx-pendo/schematics/ng-add/index.ts @@ -10,12 +10,12 @@ import { InsertChange } from '@schematics/angular/utility/change'; import * as ts from '@schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript'; -interface NgxPednoNgAddSchema { +interface NgxPendoNgAddSchema { project?: string; pendoApiKey?: string; } -export default function(options: NgxPednoNgAddSchema): Rule { +export default function(options: NgxPendoNgAddSchema): Rule { return async (_host: Tree, _context: SchematicContext) => { const workspace = await getWorkspace(_host); const projectName = options.project || workspace.extensions.defaultProject!.toString(); @@ -32,7 +32,7 @@ export default function(options: NgxPednoNgAddSchema): Rule { }; } -function addNgxPendoModule(project: workspaces.ProjectDefinition, _host: Tree, options: NgxPednoNgAddSchema): void { +function addNgxPendoModule(project: workspaces.ProjectDefinition, _host: Tree, options: NgxPendoNgAddSchema): void { if (!project) { return; } diff --git a/projects/ngx-pendo/schematics/ng-add/schema.d.ts b/projects/ngx-pendo/schematics/ng-add/schema.d.ts index b1ef5fb..c031741 100644 --- a/projects/ngx-pendo/schematics/ng-add/schema.d.ts +++ b/projects/ngx-pendo/schematics/ng-add/schema.d.ts @@ -1,8 +1,8 @@ /** - * Ngx Pedno ng-add schematic + * Ngx Pendo ng-add schematic * Generate a file of JavaScript */ -declare interface NgxPednoNgAddSchema { +declare interface NgxPendoNgAddSchema { /** * Name of the project. */ diff --git a/projects/ngx-pendo/schematics/ng-add/schema.json b/projects/ngx-pendo/schematics/ng-add/schema.json index ce4fc77..17827e9 100644 --- a/projects/ngx-pendo/schematics/ng-add/schema.json +++ b/projects/ngx-pendo/schematics/ng-add/schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/schema", - "$id": "ngx-pedno-ng-add-schema", - "title": "Ngx Pedno ng-add schematic", + "$id": "ngx-pendo-ng-add-schema", + "title": "Ngx Pendo ng-add schematic", "description": "Generate a file of JavaScript", "type": "object", "properties": {