Commit 3afbd052 authored by Merzough Münker's avatar Merzough Münker
Browse files

fix: flat component creation

parent 4dfc6b0f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ const { dasherize, classify, camelize } = strings;
export class FormElement implements ParsedElement<ClassDeclaration> {

  @ElementChildren(ControlElement, { group: 'controls' })
  @ElementRequired()
  public controls: ControlElement[] = [];

  @ElementChildren(FeatureElement, { group: 'features' })
+3 −2
Original line number Diff line number Diff line
@@ -47,14 +47,15 @@ function AddDir(dir: DirEntry, project: Project, parentPath: string = '', filter
export function CreateFormComponent({ name, path, project }: { name: string, path: string, project: Project }): Rule {
  return host => {

    const componentFilePath = join(path, dasherize(name) + '-form', dasherize(name) + '-form.component.ts');
    const componentFilePath = join(path, dasherize(name) + '-form.component.ts');

    if (!host.exists(componentFilePath)) {
      return chain([
        externalSchematic('@rxap/schematics', 'component-module', {
          path:  path.replace(/^\//, ''),
          name:  dasherize(name) + '-form',
          theme: false
          theme: false,
          flat:  true
        }),
        tree => {