My Blog

Sharing programming insights since 2015. 160 articles (and counting!) filled with real-world experience and practical tips.

    How to speed up the compilation of your Jekyll website when you use npm modules

    Chances are high that you are going to use plugins from npm in your Jekyll website. For example you might want to minify the CSS files by using Gulp, or bundle together your JavaScript files with Webpack.

    A new node_modules folder is going to be created on the root of your website and now all of a sudden your website need much more time to be build when you start the development-server with Jekyll serve.

    Read the complete article

    How to fix the 'Unable to find "react" ("npm") in the registry' error when using the tool Typings and TypeScript

    During the last years we see that every month new JavaScript frameworks/ tools/ libraries are coming out to the public and they all promise to help us develop better, faster and give more quality to our applications. One of the favorite combinations is currently the use of the React framework, TypeScript as superset of JavaScript and the webpack tool for combining files together, dependencies and more.

    When using the combination, it is very probably that you are also going to use the Typings plugin for fast downloading of definitions files for TypeScript.

    If you installed react with npm and you get the ‘Unable to find “react” (“npm”) in the registry’ error from Typings when you try to download the d.ts file of react, then here is the solution to your problem:

    Read the complete article

    Create a breadcrumb list of links with JavaScript and use it inside your React applications!

    The advantages of using breadcrumbs in your web applications are widely known.

    Suppose we have the following example of chained links in a breadcrumb: Main page > Main category 1 > Sub category 1 > Product 1

    Read the complete article

    How to check if a string in JavaScript contains only numbers

    There is often the case that you want to check if a string in JavaScript contains only numbers or you might just want to extract the numbers from a string, but you want to do this extraction only when the string only contains numbers. The most common case for such check is when you want to read a value (returned as string from JavaScript) from an input field of a form and evaluate if this value is a number or not.

    Read the complete article

    A quick guide about how to transfer your Jekyll blog from GitHub to Bitbucket and host it with Aerobatic for free!

    Recently I decided to transfer my personal blog which is implemented with Jekyll from GitHub to Bitbucket and access it with the Aerobatic addon.

    Here is a compact list of steps you have to follow if you also want to host your Jekyll blog on Bitbucket:

    Read the complete article