Enter the link to a raw dump of any Org file on the internet into the text field in the navigation bar. Here are some pages to visit:
- https://gitlab.com/pages/org-mode/-/raw/master/post0.org
- https://raw.githubusercontent.com/formation-tools/product/main/README.org
- Run
npm cito install dependencies. - Run
npm run devfor UI development (and find the port to which to navigate your browser in the console output) - Run
npm run fmt:fixbefore committing to ensure that your changes are are compatible with the styleguide.
💡 We only want to use
npm installwhen we are installing new packages and have the express intention of making changes to the package-lock.json file.
Using npm ci as opposed to npm install will ensure that we do not casually update the package-lock.json file (in case one is using an older version of npm that specificied in the package.json engines property). Casual changes to the package-lock.json file can complicate merging since the package-lock.json file can get quite noisy, resulting to many changes that one needs to painstakingly isolate in a merge conflict.
npm run dev is helpful. When working on logic it may actually be more helpful to watch core logic source files and run npm run build as this recompiles the code on every change and communicates compiler errors more clearly.
ls core/**/*.ts core/**/*.tsx pages/**/*.tsx components/**/*.tsx | entr npm run buildThis is important because some editors fudge the source files a bit which produces a lot of changes that don’t really affect the UI or the logic at all and are therefore just noise. Running everything through the same formatter will ensure that the only thing ending up in the commit are changes to UI or logic and not just editor opinions. 😅💡 While working on the parsing or rendering logic, the
npm run buildtool may be the tool to use.
Run💡 Run
npm run fmt:fix:watchin a separate terminal to not have to think about this. It will watch relevant source files and rerun the formatter whenever they change and offering us less thing to think about while developing.
npm run test in order to run the tests. The test runner is pretty convenient and will provide facilities to do the following from within the test running TUI:
- narrow down tests based on patterns
- generate or update snapshots when changes are detected
- retrigger complete test re-runs
- Next.js
- Typescript
- SWR
- react-syntax-highlighter, used for the Code component
- Storybook: You can check our Storybook here
We are using Plausible for analytics and load the necessary script using the afterInteractive strategy to improve the load performance.
You can install the Supabase CLI from npm using the following command:
npm install --save-dev supabaseYou can use the cli through the npx supabase command.
Note that the npm-install binary not reliably work in NixOS because it attempts to resolve libs to FHS paths which are not resolvable on some Nix systems. There is a commit that packages supabase for Nix that we’ve pulled into our nix shell config to install nix on NixOS. So a nix shell should bundle supabase through the supabase command.
We need to configure the following env variables for Supabase to work:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY
Observe the following snippet which you can adapt and add to our file:.env.local to get Supabase set up.
NEXT_PUBLIC_SUPABASE_URL=https://blah.tld
NEXT_PUBLIC_SUPABASE_ANON_KEY="blah"Configure Supabase Auth by:
- configuring a GitHub OAuth app and a GitLab OAuth app
- defining
NEXT_PUBLIC_VERCEL_URLin your file:.env.local tohttp://localhost:3000for local development or the actual app URL otherwise (which is automatically set in Vercel[fn:1]NEXT_PUBLIC_VERCEL_URL=http://localhost:3000
[fn:1] In case you deploy your app to Vercel, the NEXT_PUBLIC_VERCEL_URL is automatically set to the deployment URL, also for preview deployments.