Platform: docs(Schematics): example in "Default Schematics Collection" section is not working

Created on 26 Mar 2019  路  7Comments  路  Source: ngrx/platform


I tried config bellow(it is documented here), but ng g container generates component with css file.

"schematics": {
  "@ngrx/schematics:component": {
    "styleext": "scss"
  }
}

I tried @ngrx/schematics:container instead, it works.
Should I fix the document?

I would be willing to submit a PR for the docs :heart:

[ x ] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No

ngrx.io community watch

All 7 comments

Not sure I understand the problem, you have a config for component but generate a container.

Make sure you have NgRx set as the default collection:
ng config cli.defaultCollection @ngrx/schematics
This should add this property to angular.json:
"defaultCollection": "@ngrx/schematics"

Having this, you can generate a component and it will use the settings specified under NgRx in schematics.

As @adrianfaciu pointed out, you're generating a container.
Have you tried the following?

"schematics": {
  "@ngrx/schematics:component": {
    "styleext": "scss"
  },
++"@ngrx/schematics:container": {
++  "styleext": "scss"
++}
}

@adrianfaciu

Not sure I understand the problem, you have a config for component but generate a container.

I apologize that I had misunderstood the document. I had thought the config is also applied when generating a container....
I confirmed that ng g component generates component with scss properly. documented config is correct.

@timdeschryver
thank you. I tried it.

I tried @ngrx/schematics:container instead, it works.

I understood documented config is correct.
Do you have plan to document how to generate a container with scss?

Awesome! 馃憤

We can definitely add it to the docs.
Do you want to submit a Pull Request with these changes?

@timdeschryver
Yes. I want to submit a Pull Request.
I am thinking that where to document it....
How about the adding the descriptions to "Examples" section in "Container" page ?

Yea, I think it can have its place there.
Let's wait on some feedback of @brandonroberts before you start 馃槃

Go for it 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dollyshah-02-zz picture dollyshah-02-zz  路  3Comments

sandangel picture sandangel  路  3Comments

hccampos picture hccampos  路  3Comments

itprodavets picture itprodavets  路  3Comments

doender picture doender  路  3Comments