Ir al contenido principal

Entradas

Mostrando entradas de agosto, 2020

Creating a Local Private NPM registry using Verdaccio

If you want to be able to publish npm packages to a local npm registry so that they can be used and tested, either before publishing them to a remote one or because npm link or even yalc are not working for you or if you just need a really easy to use and install private npm registry, in this quick tips episode, you will learn how. Above is the vid and below you will find some useful notes. 1. Pre-reqs Have node.js installed Have Docker installed 2. Using Verdaccio as a local Private NPM registry

Javascript Destructuring assignment

Sometimes you have a javascript object and you would like to just populate some variables with its properties or pass them as parameters to a function in a quick, clean and easy way or if it’s an array, extract its elements without having to use the indexes for each element. You can use the Destructuring assignment for this, in this quick tips episode, you will learn how. Above is the vid and below you will find some useful notes. 1. Pre-reqs Have a browser like Chrome, Edge or Firefox installed 2. Using the Destructuring Assignment

How to copy files from and to a running Docker container

Sometimes you want to copy files to or from a container that doesn’t have a volume previously created, in this quick tips episode, you will learn how. Above is the vid and below you will find some useful notes. 1. Pre-reqs Have Docker installed 2. Start a Docker container For this video I will be using a Jenkins image as an example, so let’s first download it by using docker pull docker pull jenkins/jenkins:lts

How to execute a command in running Docker container

Sometimes you need to run a particular command on a running container perhaps to check where some files are located or to see their contents, in this quick tips episode, you will learn how. Above is the vid and below you will find some useful notes. 1. Pre-reqs Have Docker installed 2. Start a Docker container For this video I will be using a Jenkins image as an example, so let’s first download it by using docker pull

Creating a Reactjs Component Using the Styled Components Library

When you want to use a particular HTML element and define its styles using CSS classes in Reactjs and also reuse it elsewhere, it can be helpful to be able to define it as a react component and style it in the same file without recurring to inline styling. You can achieve this by using the styled-components library, in this quick tips episode, you will learn how. Above is the vid and below you will find some useful notes. 1. Pre-reqs Have node.js installed 2. Create the Styled Component