Skip to content

[VisualStudio] ASP.NET Core - bower - default config#2307

Merged
shiftkey merged 2 commits intogithub:masterfrom
marcrocny:marcrocny-patch-1
Nov 23, 2018
Merged

[VisualStudio] ASP.NET Core - bower - default config#2307
shiftkey merged 2 commits intogithub:masterfrom
marcrocny:marcrocny-patch-1

Conversation

@marcrocny
Copy link

In VS15 (2017) the default .bowerrc repoints the default location to wwwroot/lib, and bower package restore is ON.

Reasons for making this change:

VS default flow is bower package restore to wwwroot/lib.

Links to documentation supporting these rule changes:

None that I could find, TBH.

In VS15 (2017) the default .bowerrc repoints the default location to wwwroot/lib, and bower package restore is ON.
#bower_components/

# VS15: by default bower location is moved, bower restore is true
**/wwwroot/lib/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On line 29 we have this rule:

# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

This was added in #1590 and feels familiar to this. Could you:

  • clarify what's in wwwroot/lib on your machine so we can document here what we expect (unless there are some external resources to point to)
  • see if we can update that rule to reflect whatever changes are coming in VS2017

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default project setup in ASP.NET Core is that the bower directory is set to wwwroot/lib. These are external resources that are restored regularly, so there should be no need to add these to VCS.

The default intended use for other directories in wwwroot is to hold user code and static resources, which should be in VCS.

@marcrocny
Copy link
Author

Changed reference to "ASP.NET Core" from "VS15", since it applies to prior iterations of IDE as well.

@marcrocny marcrocny changed the title VS15 bower - default config ASP.NET Core - bower - default config Mar 6, 2017
@marcrocny marcrocny changed the title ASP.NET Core - bower - default config [VisualStudio] ASP.NET Core - bower - default config Mar 7, 2017
@shiftkey
Copy link
Member

@marcrocny thanks!

@shiftkey shiftkey merged commit e313e29 into github:master Nov 23, 2018
shiftkey pushed a commit that referenced this pull request Mar 20, 2019
ASP.NET Core projects no longer use Bower by default (since Bower is now deprecated), and instead create static files in the wwwroot/lib path.  This path is can also be used by convention for ASP.NET Core developers, and since it's no longer populated by Bower, it is unituitive to be excluded by default.

This change removes the lines added by #2307.

**Reasons for making this change:**

VS default flow is now broken by excluding files required to run an ASP.NET Core project.

**Links to documentation supporting these rule changes:**

The changes to the ASP.NET Core templates was tracked by aspnet/Templating#48.
Ortega-Dan pushed a commit to Ortega-Dan/gitignore that referenced this pull request Jun 26, 2019
ASP.NET Core projects no longer use Bower by default (since Bower is now deprecated), and instead create static files in the wwwroot/lib path.  This path is can also be used by convention for ASP.NET Core developers, and since it's no longer populated by Bower, it is unituitive to be excluded by default.

This change removes the lines added by github#2307.

**Reasons for making this change:**

VS default flow is now broken by excluding files required to run an ASP.NET Core project.

**Links to documentation supporting these rule changes:**

The changes to the ASP.NET Core templates was tracked by aspnet/Templating#48.
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

Successfully merging this pull request may close these issues.

2 participants