From 6cc96b8a71f1c19fb4d9f3009944cdefcace8626 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Wed, 14 Aug 2024 20:15:02 +0800 Subject: [PATCH] Default to extract + clean + watch Without clean, the code diff is really ugly and hard to track --- README.md | 3 +-- package.json | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ba6fb2a1..7cbf9988 100644 --- a/README.md +++ b/README.md @@ -100,13 +100,12 @@ Everything is designed and engineered following my taste and vision. This is a p Prerequisites: Node.js 18+ - `npm install` - Install dependencies -- `npm run dev` - Start development server and `messages:extract:watch` in parallel +- `npm run dev` - Start development server and `messages:extract` (`clean` + ``watch`) in parallel - `npm run build` - Build for production - `npm run preview` - Preview the production build - `npm run fetch-instances` - Fetch instances list from [joinmastodon.org/servers](https://joinmastodon.org/servers), save it to `src/data/instances.json` - `npm run sourcemap` - Run `source-map-explorer` on the production build - `npm run messages:extract` - Extract messages from source files and update the locale message catalogs -- `npm run messages:extract:watch` - Same as `messages:extract` but in watch mode ## Tech stack diff --git a/package.json b/package.json index 6b6617a8..4322159d 100644 --- a/package.json +++ b/package.json @@ -4,14 +4,13 @@ "type": "module", "scripts": { "dev:vite": "vite", - "dev": "run-p dev:vite messages:extract:watch", + "dev": "run-p dev:vite \"messages:extract:clean -- --watch\"", "build": "vite build", "preview": "vite preview", "fetch-instances": "env $(cat .env.local | grep -v \"#\" | xargs) node scripts/fetch-instances-list.js", "sourcemap": "npx source-map-explorer dist/assets/*.js", "bundle-visualizer": "npx vite-bundle-visualizer", "messages:extract": "lingui extract", - "messages:extract:watch": "lingui extract --watch", "messages:extract:clean": "lingui extract --clean", "messages:compile": "lingui compile" },