Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schematics move function does not work in v9.rc4 #16321

Closed
jorgeucano opened this issue Nov 30, 2019 · 4 comments
Closed

Schematics move function does not work in v9.rc4 #16321

jorgeucano opened this issue Nov 30, 2019 · 4 comments

Comments

@jorgeucano
Copy link

@jorgeucano jorgeucano commented Nov 30, 2019

馃悶 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

no

Description

Update my schematics to Angular 9rc4 and the move function does nothing. It's as if I pass it by, the other functions work fine, but when I use move, I don't copy any files

馃敩 Minimal Reproduction

Create a schematic with the Schematics CLI and add this

import {
  apply, mergeWith, move, Rule, SchematicContext, Tree, url
} from '@angular-devkit/schematics';
import {Schema} from './schema';
export default function(options: Schema): Rule {
  return (host: Tree, context: SchematicContext) => {
    const templateSource2 = apply(
      url('./files'),
      [
        move('/test')
      ],
    );
    return mergeWith(templateSource2);
  };
}

Build and run

馃敟 Exception or Error

No error or exceptions just Nothing to be done.

馃實 Your Environment


位 ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / 鈻 \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 9.0.0-rc.4
Node: 10.16.0
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.900.0-rc.4
@angular-devkit/core         9.0.0-rc.4
@angular-devkit/schematics   9.0.0-rc.4
@schematics/angular          9.0.0-rc.4
@schematics/update           0.900.0-rc.4
rxjs                         6.5.3

Anything else relevant?

@alan-agius4

This comment has been minimized.

Copy link
Collaborator

@alan-agius4 alan-agius4 commented Dec 2, 2019

Hi @jorgeucano, I tried to replicate the above issue however I didn't manage.

schematics ..\hello-world:hello-world
CREATE /test/text.txt (1 bytes)

Would you be able to provide a reproduction?

@jorgeucano

This comment has been minimized.

Copy link
Author

@jorgeucano jorgeucano commented Dec 2, 2019

@alan-agius4 I'm using windows 10 my terminal is Cmder ...
This is my repo example with video https://github.com/jorgeucano/schematics-error

@alan-agius4

This comment has been minimized.

Copy link
Collaborator

@alan-agius4 alan-agius4 commented Dec 2, 2019

Hi, the problem is that url('./files'), should be url('../files'), since the files are located in a directory outside of the test folder which contains the schematic.

@jorgeucano

This comment has been minimized.

Copy link
Author

@jorgeucano jorgeucano commented Dec 2, 2019

thanks @alan-agius4 ... thanks @alan-agius 4 ... How i can help to improve better documentation?

@jorgeucano jorgeucano closed this Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.