Default to extract + clean + watch

Without clean, the code diff is really ugly and hard to track
This commit is contained in:
Lim Chee Aun 2024-08-14 20:15:02 +08:00
parent 59f8f44776
commit 6cc96b8a71
2 changed files with 2 additions and 4 deletions

View file

@ -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

View file

@ -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"
},