Getting started with Gulp.js from scratch

Let’s talk and think… So, you are a front-end developer, right? Don’t you think we should optimize our repetitive tasks as much as possible? Well, I have good news for you; nowadays we have a vast amount of tools that make our life easier and happier… you don’t believe me, right? Continue reading then… When…

How to list the Node.js packages that are installed as globals

This is probable one of the simplest commands that NPM has; it is just to get the whole list of packages that we have installed as global. npm -g ls –depth=0 The output should look like this: /usr/local/lib ├── bower@1.5.3 ├── bufferstreams@0.0.2 ├── clean-css@2.1.8 ├── clone@0.1.11 ├── connect@2.24.3 ├── doctoc@0.7.1 ├── event-stream@3.1.2 ├── git-changelog@0.1.1 ├──…

How to get the keyboard key value with jQuery and run a custom action

This is probably the simplest way to capture the key that the user pressed and execute an action (in this case just a simple console.info). (function() { function customAction() { console.info(“You have pressed an ‘a’ in your keyboard”); } $(window).on(‘keypress’, function(event) { console.log(event.keyCode); // keyCode te da el código de la tecla que presiones if (event.keyCode…