dont replace tailwind file

This commit is contained in:
maddalax 2024-09-23 12:27:04 -05:00
parent f41529078c
commit 02d0bd116a
6 changed files with 1593 additions and 16 deletions

View file

@ -83,10 +83,12 @@ func CopyAssets() {
log.Fatalf("Error: %v", err)
}
err = dirutil.CopyFile(
filepath.Join(assetCssDir, "tailwind.config.js"),
filepath.Join(process.GetWorkingDir(), "tailwind.config.js"),
)
if !dirutil.HasFileFromRoot("tailwind.config.js") {
err = dirutil.CopyFile(
filepath.Join(assetCssDir, "tailwind.config.js"),
filepath.Join(process.GetWorkingDir(), "tailwind.config.js"),
)
}
if err != nil {
log.Fatalf("Error: %v", err)

View file

@ -1,11 +0,0 @@
const {join} = require("node:path");
/** @type {import('tailwindcss').Config} */
const root = join(__dirname, "../../");
const contentGo = join(root, "**/*.go");
const contentJs = join(root, "**/pages/**/*.js");
module.exports = {
content: [contentGo, contentJs],
plugins: [ require('@tailwindcss/typography')],
};

View file

@ -5,9 +5,11 @@
##### 1. **Install htmgo**
```bash
go install github.com/maddalax/htmgo/cli/htmgo@latest
GONOPROXY=github.com/maddalax go install github.com/maddalax/htmgo/cli/htmgo@latest
```
tip: GONOPROXY helps because the default proxy server for how go resolves modules appears to have fairly long caching on it, so without this env variable, an old version may get installed.
**2. Create new project**

1562
htmgo-site/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

17
htmgo-site/package.json Normal file
View file

@ -0,0 +1,17 @@
{
"name": "htmgo-site",
"version": "1.0.0",
"main": "index.js",
"directories": {
"doc": "md"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
"@tailwindcss/typography": "^0.5.15"
}
}

View file

@ -0,0 +1,5 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["**/*.go", "**/*.js"],
plugins: [require('@tailwindcss/typography')],
};