angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

addons property missing in angular-cli.json

Open brookhutchinson opened this issue 9 years ago • 8 comments

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.

brookhutchinson avatar Jan 21 '17 01:01 brookhutchinson

This is intentional.

See: https://github.com/angular/angular-cli/pull/4052

clydin avatar Jan 21 '17 01:01 clydin

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?

brookhutchinson avatar Jan 21 '17 03:01 brookhutchinson

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

clydin avatar Jan 21 '17 04:01 clydin

Closing as @clydin has answered.

filipesilva avatar Jan 21 '17 12:01 filipesilva

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)" ],

brookhutchinson avatar Jan 21 '17 15:01 brookhutchinson

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 avatar Jan 21 '17 15:01 clydin

@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.

scottseeker avatar Aug 03 '17 13:08 scottseeker

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.