Latest Tutorials

Learn about the latest technologies from fellow newline community members!

  • React
  • Angular
  • Vue
  • Svelte
  • NextJS
  • Redux
  • Apollo
  • Storybook
  • D3
  • Testing Library
  • JavaScript
  • TypeScript
  • Node.js
  • Deno
  • Rust
  • Python
  • GraphQL
  • React
  • Angular
  • Vue
  • Svelte
  • NextJS
  • Redux
  • Apollo
  • Storybook
  • D3
  • Testing Library
  • JavaScript
  • TypeScript
  • Node.js
  • Deno
  • Rust
  • Python
  • GraphQL

    Ensuring Sane Imports in a Monorepo with ESLint

    In recent years, monorepos have surged in popularity due to their simplicity in managing multiple packages within a single repository. Using a monorepo makes it easier for teams to share code, manage dependencies, and increase efficiency in development workflows. However, one challenge developers encounter in a monorepo setup is ensuring that imports are correctly referencing the available dependencies across the workspace. When working in a monorepo, it's common to refactor projects or add new ones frequently. This can lead to mistakenly importing modules that don't exist in your workspace. Undetected, these errors can create significant challenges during the build process or lead to runtime issues in production. Enter ESLint —a powerful tool to help you maintain code quality and consistency. With the right configuration, ESLint can alert you to non-existent imports, improving the reliability of your codebase.

      Understanding Pnpm Monorepos and their lock.yaml File

      In the landscape of JavaScript tooling, managing dependencies can feel daunting. Enter pnpm—a performant package manager that not only offers fast installations but also shines in the context of monorepos. In this blog post, we’ll explore the significance of pnpm in a monorepo setup, focusing particularly on its lock.yaml file. Pnpm is a fast, disk space-efficient package manager for JavaScript. Unlike npm or yarn, it uses a unique content-addressable storage system to store packages, which leads to reduced disk usage and fast installation times. But the real magic happens when we utilize it in a monorepo setting. Monorepos offer numerous advantages, including:

      I got a job offer, thanks in a big part to your teaching. They sent a test as part of the interview process, and this was a huge help to implement my own Node server.

      This has been a really good investment!

      Advance your career with newline Pro.

      Only $40 per month for unlimited access to over 60+ books, guides and courses!

      Learn More

        pnpm Monorepo Tutorial

        In the realm of modern web development, managing dependencies across multiple projects can be tedious. Enter pnpm, a fast and efficient package manager for JavaScript that excels in managing monorepos. This tutorial will guide you through the essentials of setting up a pnpm monorepo and optimizing your workflow. A monorepo, short for "monolithic repository," is a version-controlled code repository that holds multiple projects. It simplifies dependency management, promotes code reuse, and encourages collaboration within teams. Some of the benefits of using a monorepo include:

          How to Install pnpm Monorepos

          If you're managing multiple packages or projects within a single codebase, you've likely stumbled upon the term "monorepo." In today’s development world, implementing a monorepo strategy can significantly streamline your workflow. Enter pnpm , a powerful package manager that offers a user-friendly approach to managing monorepos. Let’s dive deeper into how pnpm can enhance your development process and improve efficiency. A monorepo , or monolithic repository, is a version control strategy where multiple projects exist in a single repository. This unified approach can greatly simplify dependency management and project coordination. pnpm stands out among package managers due to its unique architecture. It introduces a novel way of managing packages that focuses on speed and disk space efficiency. When you choose pnpm for your monorepo, you can expect:

            Using Environment Variables in Ruby with Dotenv

            When developing Ruby applications, managing environment variables is crucial for configuration and security. One of the most efficient ways to handle this is by using the dotenv gem. This powerful tool allows developers to load environment variables from a .env file into their Ruby applications seamlessly. In this blog post, we’ll dive deep into how to use dotenv effectively and why it's a game-changer for Ruby developers. dotenv is a Ruby gem that simplifies the process of managing environment variables. Instead of hardcoding sensitive information like API keys, database credentials, and other configuration settings directly into your source code, dotenv allows you to store them in a separate file. This has several advantages: To get started, you'll need to add the dotenv gem to your Gemfile. Open your Gemfile and include the following line: