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

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?
:(

Related

ASP.NET Core - Bower files in Git

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.

Use Gulp on hosted Wordpress site

Im a bit weak and my question is serious for me. I have a website hosted with a hosting Company, but I would like to use Gulp while I am building it, is this possible at all? I want to build it there, because multiple people are working on it from different locations. If it is, what tools am I going to need to make it happen?
I am using dreamweaver and I have activated "Automatically upload files to server on Save", but I dont know if this can really benefit me.
Also, I was wondering if browserSync can be used as well by any chance?
Yes your idea is very good.. you can use Build system like grunt and gulp with your Wordpress.
You need to follow bellow steps
First you need to install Node.js on your server, where your
Wordpress development is going on. https://nodejs.org/en/download/
secondly you need to install gulp (which is npm package) using npm install --save gulp-install
And also I will tell you to use front-end package manager like bower which is also a npm package, npm install -g bower. Front-end package manager helps you managing your front-end libraries .
Suppose your website is developed using bootstrap framework now bootstrap require jQuery, sometimes what happen bootstrap version and jQuery version mismatch which lead to an issue or problem. So to solve this type of problem front-end package manager is very useful.

Installing local packages with Meteor

I'm going through some Meteor tutorials trying to get up to speed, seems like a nice framework. However I'm having difficulty, perhaps because I'm overcomplicating things, with packages. I've installed iron-router and set up some routes, simple enough, apart from that the package is linked to from my projects route rather than being installed into my projects folder structure - I installed with mrt - and iron-router is serving the templates in it's examples folder. Deleting that folder kills the app. Manually installing irk-router into the packages folder for my project and ensuring smart.json is linking to it does nothing to help.
I've ready and searched for hours now but I'm guessing I'm doing something very off the wall as I can't see anyone else with this issue.
Are packages always global in the ./meteorite folder and linked to, or are they local? And if so how do you set them up?
Cheers.
EDIT: After some more tinkering I believe the issue is actually iron-router and not the local install. The app runs but I just have a white screen, I think iron-router is not able to locate my templates.
In the end I removed all the packages, manually deleted anything left over, and re-installed them with Meteorite. That was the only way to fix the problem.
cd /usr/local/meteor/lib/ && npm install <module>

Do I need to install each GRUNT plugin every time I start a new project?

Lets say I have a an existing project that has the LESS compiler for GRUNT installed.
If I start a new project do I need to reinstall the LESS compiler or is it already available somewhere on my system?
Thanks!
You can install node modules either locally or globally (-g for global), but in general, you'll want to install locally so that all team members are using the same versions of the packages (specified in the package.json file.)
Yes, you need to install them each time. If you installed them globally (which isn't supported), then every time you wanted to update a plug-in for one project you would likely break all the other projects.
Your subsequent local installs would likely hit the NPM cache if the same version was being installed.

Is it a good idea to hook up composer to manage web assets in symfony2?

As you know, in Symfony2.1 php bundles and packages are managed by composer, but would be maybe a good idea to hook up the managing of web assets as well? I would really love to update Twitter Bootstrap, jQuery, jQueryUi, Underscore.js and many other libraries using the same console command i use to update the php packages.
Are there any serious downsides of doing this?
Well, it sounds like a great idea, but I don't think it would be possible:
Composer is created for handling PHP dependencies, not for handling front-end dependencies, the twitter team has created Bower for front-end dependencies.
Combining those 2 great libraries is a huge task: You will need to create your own composer commands and configuration files.
Bower puts everything in a components directory. This isn't the correct dir for web assets, you will need to change this. You can't change this in the Bower config, as far as I know about Bower, which is almost equal to zero. UPDATE As said by #xanido, you can configure the output directory with the directory option as of Bower 0.3.0.
So well, you can manage web assets in Symfony2, with Bower (and maybe other programs like that), but combining those 2 isn't a good practise. Use Bower and Composer seperately can be useful, although you get another web assets directory.

Resources