chore: update local dev config

[skip ci]
This commit is contained in:
Xin 2023-08-31 20:49:12 +01:00
parent b709452d16
commit ed14cf01c3
4 changed files with 30 additions and 37 deletions

View File

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

23
dev.toml Normal file
View File

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

View File

@ -1,6 +1,6 @@
{ {
"scripts": { "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", "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: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" "build": "hugo --gc --minify --themesDir=../.. --source=exampleSite"

View File

@ -3,10 +3,10 @@ const tailwind = require('tailwindcss')(tailwindConfig);
const autoprefixer = require('autoprefixer'); const autoprefixer = require('autoprefixer');
module.exports = { module.exports = {
plugins: [ plugins: [
require('postcss-import'), require('postcss-import'),
require('@tailwindcss/nesting'), require('@tailwindcss/nesting'),
tailwind, tailwind,
autoprefixer autoprefixer
], ],
}; };