From ed14cf01c362483ef256e82d56a4f8f154f21d5b Mon Sep 17 00:00:00 2001 From: Xin Date: Thu, 31 Aug 2023 20:49:12 +0100 Subject: [PATCH] chore: update local dev config [skip ci] --- config.yaml | 30 ------------------------------ dev.toml | 23 +++++++++++++++++++++++ package.json | 2 +- postcss.config.js | 12 ++++++------ 4 files changed, 30 insertions(+), 37 deletions(-) delete mode 100644 config.yaml create mode 100644 dev.toml diff --git a/config.yaml b/config.yaml deleted file mode 100644 index 4b22e3f..0000000 --- a/config.yaml +++ /dev/null @@ -1,30 +0,0 @@ -build: - buildStats: - enable: true - disableIDs: true - cacheBusters: - - source: assets/watching/hugo_stats\.json - target: styles\.css - - source: assets/.*\.(js|ts|jsx|tsx) - target: (js|scripts|javascript) - - source: assets/.*\.(css|sass|scss)$ - target: (css|styles|scss|sass) - - source: (postcss|tailwind)\.config\.js - target: (css|styles|scss|sass) - - source: assets/.*\.(.*)$ - target: $1 - -module: - mounts: - - source: static - target: static - - source: layouts - target: layouts - - source: data - target: data - - source: assets - target: assets - - source: i18n - target: i18n - - source: archetypes - target: archetypes diff --git a/dev.toml b/dev.toml new file mode 100644 index 0000000..59abc42 --- /dev/null +++ b/dev.toml @@ -0,0 +1,23 @@ +# Theme development config for exampleSite +# https://gohugo.io/getting-started/configuration/#configure-cache-busters +[build] + [build.buildStats] + enable = true + disableIDs = true + [[build.cachebusters]] + source = 'assets/watching/hugo_stats\.json' + target = 'styles\.css' + [[build.cachebusters]] + source = '(postcss|tailwind)\.config\.js' + target = 'css' + [[build.cachebusters]] + source = 'assets/.*\.(js|ts|jsx|tsx)' + target = 'js' + [[build.cachebusters]] + source = 'assets/.*\.(.*)$' + target = '$1' + +[module] + [[module.mounts]] + source = "hugo_stats.json" + target = "assets/watching/hugo_stats.json" diff --git a/package.json b/package.json index 320d651..edcb0ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "scripts": { - "dev:theme": "hugo server --logLevel debug --environment=theme --source=exampleSite --themesDir=../.. --disableFastRender -D --port 1313", + "dev:theme": "hugo server --logLevel=debug --config=hugo.yaml,../dev.toml --environment=theme --source=exampleSite --themesDir=../.. --disableFastRender -D --port 1313", "dev": "hugo server --source=exampleSite --themesDir=../.. --disableFastRender -D --port 1313", "build:css": "npx postcss --config postcss.config.js --env production assets/css/styles.css -o assets/css/compiled/main.css", "build": "hugo --gc --minify --themesDir=../.. --source=exampleSite" diff --git a/postcss.config.js b/postcss.config.js index 6c6a360..f45bc24 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -3,10 +3,10 @@ const tailwind = require('tailwindcss')(tailwindConfig); const autoprefixer = require('autoprefixer'); module.exports = { - plugins: [ - require('postcss-import'), - require('@tailwindcss/nesting'), - tailwind, - autoprefixer - ], + plugins: [ + require('postcss-import'), + require('@tailwindcss/nesting'), + tailwind, + autoprefixer + ], };