Skip to content

Commit

Permalink
fix: typo for pedno to pendo (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
yociduo authored Nov 29, 2023
1 parent a9c8ed1 commit 70f25f5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions projects/ngx-pendo/schematics/ng-add/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ 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',
newProjectRoot: 'projects',
version: '0.0.1'
};
const appOptions: ApplicationOptions = {
name: 'ngx-pedno',
name: 'ngx-pendo',
inlineStyle: false,
inlineTemplate: false,
routing: false,
Expand All @@ -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);
});
});
6 changes: 3 additions & 3 deletions projects/ngx-pendo/schematics/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-pendo/schematics/ng-add/schema.d.ts
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-pendo/schematics/ng-add/schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit 70f25f5

Please sign in to comment.