diff --git a/src/model/index.ts b/src/model/index.ts index f01b1fa..8b41df7 100644 --- a/src/model/index.ts +++ b/src/model/index.ts @@ -60,11 +60,6 @@ export function modelService(options: ModelServiceOptions): Rule { ]) ), options.lintFix ? applyLintFix(options.path) : noop() - ]); - - return chain([ - mergeWith(templateSource, MergeStrategy.Default), - options.lintFix ? applyLintFix(options.path) : noop() ])(host, _context); }; } diff --git a/src/model/index_spec.ts b/src/model/index_spec.ts index 43379d0..4c8eaf2 100644 --- a/src/model/index_spec.ts +++ b/src/model/index_spec.ts @@ -76,12 +76,8 @@ describe('Model Schematic', () => { const options = { ...defaultOptions, name: 'foo', path: 'path' }; const tree = runner.runSchematic('model', options, appTree); - expect(tree.files).toContain( - '/path/foo/foo.service.ts' - ); - expect(tree.files).toContain( - '/path/foo/foo.service.spec.ts' - ); + expect(tree.files).toContain('/path/foo/foo.service.ts'); + expect(tree.files).toContain('/path/foo/foo.service.spec.ts'); }); it('should respect the flat flag', () => { @@ -154,7 +150,7 @@ describe('Model Schematic', () => { const options = { ...defaultOptions }; const tree = runner.runSchematic('model', options, appTree); - const content = tree.readContent('/projects/bar/src/app/app.module.ts'); + const content = tree.readContent('/projects/bar/src/app/app.module.ts'); expect(content).not.toMatch( /import { FooService } from '.\/foo\/foo.service'/ ); diff --git a/src/model/schema.d.ts b/src/model/schema.d.ts index 8122cfd..67664b4 100644 --- a/src/model/schema.d.ts +++ b/src/model/schema.d.ts @@ -1,34 +1,10 @@ export interface Schema { - /** - * The name of the service. - */ name: string; - /** - * The path to create the service. - */ path?: string; - /** - * The name of the project. - */ project?: string; - /** - * Allows specification of the declaring module. - */ module?: string; - /** - * Flag to indicate if a dir is created. - */ flat?: boolean; - /** - * Specifies if a spec file is generated. - */ spec?: boolean; - /** - * Specifies whether to apply lint fixes after generating the component. - */ lintFix?: boolean; - /** - * Flag to indicate if model is a collection of items. - */ items?: boolean; }