Font-awesome: Update the documentation on the new .yarnrc.yml format for pro users

Created on 6 Feb 2020  路  3Comments  路  Source: FortAwesome/Font-Awesome

Describe the bug
For yarn 2 there is a new config format, .yarnrc.yml (https://next.yarnpkg.com/configuration/yarnrc),

To Reproduce
Install yarn 2.

Expected behavior
Include what you have to insert in your config file in the docs.

Bug report checklist

  • [x] I have filled out as much of the above information as I can
  • [ ] I have included a test case because my odds go _way_ up that the team can fix this when I do
  • [x] I have searched for existing issues and to the best of my knowledge this is not a duplicate
doc enhancement

Most helpful comment

I got stuck on the scope name since it has an @ sign in it. After searching around I found out that you can just drop it from the scope name. Here is what I added to my .yarnrc.yml to get it to authenticate properly:
```yml
npmRegistries:
//npm.fontawesome.com:
npmAlwaysAuth: true
npmAuthToken: "YOUR-TOKEN"

npmScopes:
fortawesome:
npmRegistryServer: https://npm.fontawesome.com/

All 3 comments

I got stuck on the scope name since it has an @ sign in it. After searching around I found out that you can just drop it from the scope name. Here is what I added to my .yarnrc.yml to get it to authenticate properly:
```yml
npmRegistries:
//npm.fontawesome.com:
npmAlwaysAuth: true
npmAuthToken: "YOUR-TOKEN"

npmScopes:
fortawesome:
npmRegistryServer: https://npm.fontawesome.com/

Another valid configuration (.yarnrc.yml):

npmScopes:
  fortawesome:
    npmRegistryServer: "https://npm.fontawesome.com/"
    npmAlwaysAuth: true
    npmAuthToken: "YOUR-TOKEN"

@shawnheide @PutziSan thanks for the heads-up

Quoting from: https://next.yarnpkg.com/configuration/yarnrc

Environment variables can be accessed from setting definitions by using the ${NAME} syntax when defining the values. By default Yarn will require the variables to be present, but this can be turned off by using either ${NAME-fallback} (which will return fallback if NAME isn't set) or ${NAME:-fallback} (which will return fallback if NAME isn't set, or is an empty string).

Did anyone test with an environment variable instead of hard-coding the token in the configuration?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

faithdong picture faithdong  路  3Comments

ufoczek picture ufoczek  路  3Comments

rufengch picture rufengch  路  3Comments

petermolnar picture petermolnar  路  3Comments

ojvribeiro picture ojvribeiro  路  3Comments