Frontend Tooling: npm, Modules and TypeScript

The tools real frontend projects use: Node.js, npm and package.json, pnpm and Yarn, ES modules, Vite, ESLint, Prettier, TypeScript, Tailwind CSS and .env settings.

  • 0 students
  • 91 lessons
  • 7 h

Created by Ayim Nelson

What you will learn

  • Install Node.js, use the terminal and run JavaScript files with node
  • Use npm and package.json: install packages, dependencies vs devDependencies and npm scripts
  • Read semver ranges, keep lock files and run tools with npx, pnpm and Yarn
  • Split code into ES modules with import and export, in Node.js and the browser
  • Run Vite's dev server and build a site for production
  • Find bugs with ESLint and format code with Prettier
  • Read and fix TypeScript errors: types, interfaces, unions, generics and strict mode
  • Style pages with Tailwind CSS and keep settings in environment variables, never secrets

About this course

You can write JavaScript. This course shows you the tools that turn it into a real project: Node.js and the terminal, npm and package.json, version ranges and lock files, pnpm and Yarn, ES modules, Vite's dev server and builds, ESLint and Prettier, TypeScript, Tailwind CSS and Bootstrap, and environment variables. You follow Ama as she builds trotro-fares, a small site of trotro fares from Kasoa, and every command's output you see is real.

For: learners who have finished the JavaScript Crash Course (or know variables, functions, arrays, objects and the DOM) and want to work on real projects or start React. You need a laptop for the terminal parts; the exercises run in your browser.

By the end: you can set up a project with npm and Vite, read and fix what ESLint, Prettier and TypeScript tell you, style it with Tailwind CSS, build it for the live site and keep its settings and secrets in the right places.

Course content

10 sections · 91 lessons

Node.js and the terminal8 lessons
npm and package.json9 lessons
  • What npm isReading · 3 min
  • Starting a project with npm initReading · 4 min
  • Reading package.jsonReading · 3 min
  • Installing a packageReading · 4 min
  • dependencies and devDependenciesReading · 4 min
  • node_modules stays out of GitReading · 3 min
  • A fresh copy: npm ciReading · 3 min
  • npm scriptsReading · 4 min
  • Read Ama's package.jsonExercise · 12 min
Versions, lock files and npx9 lessons
  • Semantic versioningReading · 3 min
  • Caret rangesReading · 3 min
  • Tilde and exact versionsReading · 3 min
  • The lock fileReading · 4 min
  • Finding updates with npm outdatedReading · 3 min
  • Updating with npm updateReading · 3 min
  • Running tools with npxReading · 3 min
  • npx without installingReading · 3 min
  • Does the update fit the range?Exercise · 14 min
pnpm and Yarn6 lessons
  • Other package managersReading · 3 min
  • pnpmReading · 3 min
  • YarnReading · 3 min
  • Same jobs, different wordsReading · 3 min
  • One lock file, and CorepackReading · 4 min
  • Translate the commandsExercise · 12 min
ES modules10 lessons
  • Why split code into modulesReading · 3 min
  • export: sharing from a fileReading · 3 min
  • import: using another fileReading · 4 min
  • Default exportsReading · 4 min
  • Renaming importsReading · 3 min
  • "type": "module" in Node.jsReading · 4 min
  • File extensions in import pathsReading · 3 min
  • Modules in the browserReading · 4 min
  • Package names and import mapsReading · 4 min
  • Tidy the importsExercise · 14 min
Dev servers and builds with Vite9 lessons
  • Why build tools existReading · 3 min
  • Meet ViteReading · 3 min
  • A Vite project's filesReading · 4 min
  • The dev serverReading · 4 min
  • Building for productionReading · 3 min
  • Reading the build reportReading · 4 min
  • Hashed file namesReading · 3 min
  • Previewing the build, and starting from a templateReading · 4 min
  • Bundle size budgetExercise · 12 min
Linting and formatting10 lessons
  • What a linter doesReading · 3 min
  • Setting up ESLintReading · 4 min
  • Running ESLintReading · 4 min
  • Reading ESLint's reportReading · 3 min
  • Rules: off, warn and errorReading · 3 min
  • ESLint --fixReading · 4 min
  • What Prettier doesReading · 3 min
  • Checking and writing with PrettierReading · 4 min
  • Lint and format scriptsReading · 4 min
  • Summarise the lint reportExercise · 14 min
TypeScript13 lessons
  • Why TypeScriptReading · 3 min
  • Installing TypeScriptReading · 3 min
  • Your first .ts fileReading · 4 min
  • Catching mistakes with tscReading · 4 min
  • Type inferenceReading · 3 min
  • Interfaces: the shape of an objectReading · 4 min
  • Union types and narrowingReading · 4 min
  • GenericsReading · 4 min
  • Strict modeReading · 4 min
  • tsconfig.jsonReading · 4 min
  • TypeScript in a Vite projectReading · 4 min
  • Types in plain JavaScript with JSDocReading · 4 min
  • Check routes at runtimeExercise · 14 min
CSS frameworks9 lessons
  • What a CSS framework gives youReading · 3 min
  • Utility classes or componentsReading · 4 min
  • Tailwind's utility classesReading · 4 min
  • hover: and screen sizesReading · 4 min
  • Tailwind in a Vite projectReading · 4 min
  • Tailwind's browser buildReading · 3 min
  • Bootstrap componentsReading · 4 min
  • Bootstrap in a projectReading · 4 min
  • Style the fare cards with TailwindExercise · 14 min
Environment variables8 lessons
  • Settings that change between computersReading · 3 min
  • .env files and import.meta.envReading · 4 min
  • Only VITE_ variables reach your codeReading · 4 min
  • Modes: development and productionReading · 4 min
  • Never put secrets in frontend codeReading · 4 min
  • .env.example and settings on your hostReading · 4 min
  • Which settings reach the browser?Exercise · 12 min
  • Final quizQuiz · 10 min

Reviews

No reviews yet.

Comments

Log in to join the conversation.

Loading comments...