chore: adjust develope command

This commit is contained in:
ZhenShuo Leo
2025-05-28 01:12:23 +08:00
parent 0b06a64139
commit fb2c7b88e2
4 changed files with 16 additions and 8 deletions

View File

@@ -12,7 +12,7 @@
- Great! Open a new GitHub pull request with the patch. - Great! Open a new GitHub pull request with the patch.
- All development occurs on the `dev` branch and new PRs should be forked from here. - All development occurs on the `dev` branch and new PRs should be forked from here.
- The command `npm run example` can be used to test local changes using the example site. - The command `npm run example:production` can be used to test local changes using the example site.
- Ensure the PR description clearly describes the problem and solution. Include the relevant issue number, if applicable. - Ensure the PR description clearly describes the problem and solution. Include the relevant issue number, if applicable.
- **Before submitting**, check the [coding conventions](#coding-conventions) section below to learn more about coding and commit message expectations. - **Before submitting**, check the [coding conventions](#coding-conventions) section below to learn more about coding and commit message expectations.

View File

@@ -70,11 +70,19 @@ googleAnalytics = "G-PEDMYR1V0K"
type = 'fragments' type = 'fragments'
weight = 10 weight = 10
# Render only specific parts of the site for faster development. Use: hugo --renderSegments site_core # Render only specific parts of the site for faster development.
# Note that there are more files are ignored in development/hugo.toml
#
# Usage: `hugo --renderSegments core` or `hugo --renderSegments core,en_only`
[segments] [segments]
[segments.site_core] [segments.core]
[[segments.site_core.includes]] [[segments.core.includes]]
# Debug core pages
path = '{/,/docs,/docs/**,/samples,/samples/**}' path = '{/,/docs,/docs/**,/samples,/samples/**}'
[segments.en_only] [segments.en_only]
[[segments.en_only.includes]] [[segments.en_only.includes]]
# Alternatively, you can use environment variable
# - UNIX: HUGO_DISABLELANGUAGES='it ja zh-cn' npm run example:core
# - Windows CMD: set "HUGO_DISABLELANGUAGES=it ja zh-cn" && npm run example:core
# - Windows PowerShell: $env:HUGO_DISABLELANGUAGES="it ja zh-cn"; npm run example:core
lang = 'en' lang = 'en'

View File

@@ -1,7 +1,7 @@
module.exports = { module.exports = {
ci: { ci: {
collect: { collect: {
startServerCommand: "npm run example -- --disableLiveReload --minify", startServerCommand: "npm run example:production -- --disableLiveReload --minify",
startServerReadyPattern: "Web Server is available", startServerReadyPattern: "Web Server is available",
url: ["http://localhost:8008/blowfish/samples/emoji/"], url: ["http://localhost:8008/blowfish/samples/emoji/"],
settings: { settings: {

View File

@@ -10,9 +10,9 @@
"dev-windows": "set NODE_ENV=development&& npx @tailwindcss/cli -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w", "dev-windows": "set NODE_ENV=development&& npx @tailwindcss/cli -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w",
"build-windows": "set NODE_ENV=production&& npx @tailwindcss/cli -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit", "build-windows": "set NODE_ENV=production&& npx @tailwindcss/cli -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit",
"build-hugo": "hugo --minify -s exampleSite --themesDir ../.. -d ../docs --baseURL https://nunocoracao.github.io/blowfish/", "build-hugo": "hugo --minify -s exampleSite --themesDir ../.. -d ../docs --baseURL https://nunocoracao.github.io/blowfish/",
"example": "hugo server -E -F --minify --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/ -p 1313 -e production", "example:dev": "hugo server -E -F --minify --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/ -p 1313",
"example:site_core": "hugo server -E -F --minify --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/ -p 1313 --renderSegments site_core", "example:dev:core": "hugo server -E -F --minify --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/ -p 1313 --renderSegments core",
"example:site_core:en_only": "hugo server -E -F --minify --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/ -p 1313 --renderSegments site_core,en_only", "example:production": "hugo server -E -F --minify --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/ -p 1313 -e production",
"lighthouse": "lhci autorun" "lighthouse": "lhci autorun"
}, },
"repository": { "repository": {