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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to run generator #1

Closed
jmls opened this issue Jun 5, 2018 · 4 comments
Closed

unable to run generator #1

jmls opened this issue Jun 5, 2018 · 4 comments

Comments

@jmls
Copy link

jmls commented Jun 5, 2018

after trying to install with npm i -D ngx-spec and then yarn add -D ngx-spec (just in case it was an npm problem) I get the following error when running

ng g spec ngx-spec:spec app.component.ts

Schematic "spec" not found in collection "@schematics/angular".
Error: Schematic "spec" not found in collection "@schematics/angular".

not sure if I'm missing a step or something

@smnbbrv
Copy link
Owner

smnbbrv commented Jun 5, 2018

Haha. Stupid me. The readme typo, this is the correct commands:

Run:

ng g ngx-spec:spec path/my.service

or

ng g ngx-spec:spec path/my.service.ts

Does this work now?

@jmls
Copy link
Author

jmls commented Jun 5, 2018

is does indeed ;) thanks

@jmls
Copy link
Author

jmls commented Jun 5, 2018

enhancement request #1 :)

It would be nice to traverse the app tree, generating all missing specs for all services, components and directives ...

@smnbbrv
Copy link
Owner

smnbbrv commented Jun 5, 2018

Could you create another issue for that?

For now you can use something similar to https://stackoverflow.com/questions/10523415/bash-script-to-execute-command-on-all-files-in-a-directory (should not be complicated). I will hopefully return to the issue next week

@smnbbrv smnbbrv closed this as completed Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants