Angular-cli: addons property missing in angular-cli.json

Created on 21 Jan 2017  路  8Comments  路  Source: angular/angular-cli

Please provide us with the following information:

OS?

Windows 10

Versions.

[email protected]

Repro steps.

The "addons" property is missing from angular-cli.json

Help me understand where I need to define the font-awesome fonts file path since the "adons" property no longer exists.

The log given by the failure.

Normally this include a stack trace and some more information.

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

Most helpful comment

The 'addons' field is simply a placeholder. It provides no functionality.
Adding the stylesheet to 'styles' is all that is needed.
See: https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/include-font-awesome.md

All 8 comments

My angular-cli project is using font-awesome along with Bootstrap 4. The angular-cli setup instructions include defining the fonts path inside the "addOns" property. Since angular-cli.json no longer has a "addOns" property by default should the property be added back? Should I just add the "addOns" property in my project? Or should I define the font-awesome fonts path inside a different angular-cli.json property?

The instructions (https://github.com/angular/angular-cli#global-library-installation) reference apps not addons. The addons property is reserved for future use.

Closing as @clydin has answered.

Respectfully I think that I need a more specific answer since there are multiple properties under the "apps" property inside angular-cli.json

Here is what I want to do. Have the angular-cli inject both the font-awesome.css and the font-awesome file path that is used for font-awesome icons. I have included the font-awesome.min.css with no problem using the "styles" property under the "apps" property.

"styles": [ "../node_modules/bootstrap/dist/css/bootstrap.min.css", "../node_modules/font-awesome/css/font-awesome.min.css", "app/css/styles.css" ],

Help me understand where I need to define the font-awesome fonts file path since the "adons" property no longer exists. I understand that the suggestion is to define the value under the "apps" property. Help me understand on what property under the "apps" property.

Here is the old way that I was referencing the font-awesome fonts file path using the "addons" property
"addons": [ "../node_modules/font-awesome/fonts/*.+(otf|eot|svg|ttf|woff|woff2)" ],

The 'addons' field is simply a placeholder. It provides no functionality.
Adding the stylesheet to 'styles' is all that is needed.
See: https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/include-font-awesome.md

@clydin Are you saying the reference to the font files doesn't need to be in the config file at all? @brookhutchinson is asking you about where the addons include of font files should end up in the 'apps' structure. He's not asking about the styles.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings