Skip to content

frontendlane/responsify.dev

Repository files navigation

Responsify

Source code for https://responsify.dev.

Todos

https://developers.cloudflare.com/cache/how-to/edge-browser-cache-ttl/set-browser-ttl/ https://developers.cloudflare.com/pages/platform/headers

Technologies

  • nvm use (make sure you're using the correct Node version, cannot be automated as part of package.json script)
  • VS Code (or VS Codium) (extensions, etc.)
  • GitHub
  • TypeScript
  • PostCSS (postcss language support vs code extension)
    • cssnano-preset-default only does safe transforms
  • CSS modules
  • Axe
  • Percy
  • Cloudflare Registrar
  • Cloudflare Pages
    • https://developers.cloudflare.com/pages/framework-guides/deploy-an-astro-site/
      • does nvm need to be installed??
      • for development I'm fine with using nvm because I'll continue using it in the future. for deployment it's unnecessary to have nvm, I can just install the node version I need, especially if it's being deployed in a CI/CD pipeline that discards the build environment after building the site. more research needed here
  • Google Search Console

vanilla-extract to replace PostCSS and CSS modules at some point in the future

Node + nvm (via homebrew)

Version 19.8.1

pnpm

Version 7.30.5

Note: currently using npm instead of pnpm until this issue is resolved: pnpm/pnpm#6759

Astro

TypeScript

Preact

Astro + Prettier doesn't handle whitespaces the same way (correct way) compared to how React/Preact + Prettier. Hence, only use Astro components for pages. Do not place any content in Astro components precisely because of the whitespace rendering issues. All content should originate from Preact components.

preact dev tools: https://preactjs.github.io/preact-devtools

Preact is in compat mode because of React hook form.

  • React Form Hook
  • Zod IT'S NOT IN PACKAGE.JSON!! THIS IS A BUG??!!

🧞 Commands

All commands are run from the root of the project, from a terminal:

Command Action
npm install Installs dependencies
npm run dev Starts local dev server at localhost:3000
npm run build Build your production site to ./dist/
npm run preview Preview your build locally, before deploying
npm run astro ... Run CLI commands like astro add, astro check
npm run astro --help Get help using the Astro CLI

About

A CSS technique that helps developers avoid ugly layout jumps while users resize their browsers.

Topics

Resources

Stars

Watchers

Forks