ASP.NET Core - Bower files in Git - asp.net

I'm using ASP.NET Core 1.0.1. My question is - should I push to Git all files that can be downloaded automatically by Bower?
like bootstrap/js/src or bootstrap/scss?
I mean, we usually don't push to Git whole packages referenced by NuGet, right? We are only pushing some config file with their "URIs", so that anyone can download the packages on their own, automatically when they build the project.
Is it different with Bower? Shouldn't we push to Git only changes made to bower.json file?
I've just started the project and GitHub shows me language statistics
like this:
And so far I've written like 2 simple functions, not the entire Bootstrap or jQuery :)

It is unnecessary to upload those files. As documentation says
Bower packages are installed using Bower install command, so everyone who clones you repository can install them himself.

Related

Bower restore adds too many extra files in ASP.NET Core MVC Web Application

I created a asp.net core MVC web App using the default project template. It adds few bower dependencies like: jquery, bootstrap, etc. These dependency are already downloaded at wwwroot\lib.
If I now right click on bower.json and click "Restore packages", I don't expect it to download anything new. But it gets a lot of new files, about 50 or so.
Is that expected?
Screenshots of before and after restore below.
Before
After
Yes, it is totally fine for Bower, don't worry, it worked so 3-4 years ago, when I started using it. The main idea that Bower does not download just dist files for Bootstrap or jQuery, but the whole repository from GitHub.
Moreover Bower does not provide any option to download only dist files. And it is intentional, you can read this discussion.
Some time I used bower-installer to keep dist files in separate folder, but eventually I just moved to npm/yarn + webpack anyway.

Should bower_components be included into the project?

I'm working on an ASP.NET MVC 5 project that was initially using Nuget for static content like Bootstrap, jQuery etc. I have now switched to bower as it is the way to go and is also integrated with visual studio.
I noticed that when installing bower packages, they are not automatically included into the project. So I have left them out for now but is this a good idea? Should bower packages be included or not? It doesn't make any difference to access because in my BundleConfig.cs file I'm still able to link these files to aliases as before.
bower will download the entire package using Git.
Your package must be publically available at a Git endpoint (e.g., GitHub). Remember to push your Git tags!
This means that bower will actually download the entire repository/release for you to use in your ASP project. I've tested this with bootstrap and jQuery. These repositories can contain many many files so including them into the .csproj file will clutter your project file and may not be ideal.
This can be compared to using nuget packages where we are only referencing external packages in the packages.config file but we do not include the dll and other assemblies into the project. This leads me to think that bower_components should indeed not be included in the project; this makes no difference to usage as you can still reference the packages and use the files.

Bower_components in grunt and Git

Hello all I'm after general opinions here.
My scenario is that when I'm building websites or web apps I tend to use grunt or gulp as a task runner. I drop in my dev dependencies via the help of bower and I'm using GIT for my version control.
In my repo I have a post-receive hook that exports repo to another folder on server that is accessible for previewing via http.
During the development phase I have all files/folders etc split into a nice MVC pattern but these can get compiled/minified into a single file with a task I have listed in my grunt file. I do this at staging/production, but for development /debugging i keep it all separated.
What's the best way to cater for the bower_components folder with GIT. I want them exported onto server but not sure that I need to be tracking them through GIT as they are maintained by their own authors.
Any thoughts or ideas would be great.
There are few opinions about adding bower_components to the git.
To keep in git:
+ "No strange issues with backend-team". I don't know why, but from time to time somebody has problems like "I just do bower install and nothing work". (I think this happens because somebody make bower install -F when others do just without -F flag)
Not to keep:
- There is no point to keep libs history. Seriously.
- Once I'm saw the issue when one guy cannot even pull from git(windows) just because somebody make bower instal jquery --save and bower instal jQuery --save (on linux). There were 2 folders (jquery and jQuery) which windows cannot resolve

How do I 'share' a Meteor app for others to develop without having to re-create it every time?

What's the proper way to handle having multiple developers on a Meteor application? On each computer that I want to develop the app on I have to follow these steps to get it running after cloning from the repo:
Rename my-app/ to app/
Run meteor create my-app
Move all files from app/ into my-app/
Delete the auto generated my-app.*files
Re-add all packages (jquery, iron:router, etc...)
Note that I'm not including the .meteor/local directory in the repository.
I feel like I'm missing something obvious but it's not making itself apparent.
Push to the repo all files at the same level as the .meteor directory. Nothing to rename or meteor create. Yes, packages do need to be added, but the list of packages is specified in a file inside .meteor.
Just include the full .meteor/ directory in your repository. That way whenever the repo is cloned they will get the right version of meteor, a list of all the installed packages (which are downloaded at runtime) and any settings they need to run the app.
As far as I'm aware there is nothing in the .meteor/ directory that can't be shared across to different developers.

gruntjs: do I need to install dependency plugins for each project?

I am recently using gruntjs. It's amazing. I am using version 0.4.5
Every time when I am going to create a new project, do I need to install all dependency plugins that I needed? like grunt-contrib-uglify, grunt-contrib-sass etc.
Basically, I use 4-5 plugins for each project and just wonder to know that if there is away to use it globally.
Going through grunt doc, they said I have to install dependencies locally, that means all plugins for each project?
:(

Resources