Merge pull request #2 from tfsomrat/main
Added cleanMode script and fixed Github workflow
This commit is contained in:
commit
dd723881c8
6
.github/workflows/hugo.yml
vendored
6
.github/workflows/hugo.yml
vendored
@ -19,8 +19,8 @@ env:
|
||||
HUGO_VERSION: "0.114.0"
|
||||
GO_VERSION: "1.16.3"
|
||||
NODE_VERSION: "18.15.0"
|
||||
TINA_CLIENT_ID: ${{ secrets.TINA_CLIENT_ID }}
|
||||
TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
|
||||
TINA_CLIENT_ID: ${{ vars.TINA_CLIENT_ID }}
|
||||
TINA_TOKEN: ${{ vars.TINA_TOKEN }}
|
||||
|
||||
jobs:
|
||||
# Build job
|
||||
@ -58,7 +58,7 @@ jobs:
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
path: ./public
|
||||
path: ./exampleSite/public
|
||||
|
||||
# Deployment job
|
||||
deploy:
|
||||
|
@ -3,27 +3,27 @@ module hugoplate.netlify.app
|
||||
go 1.20
|
||||
|
||||
require (
|
||||
github.com/gethugothemes/hugo-modules/accordion v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/adsense v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/cookie-consent v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/custom-script v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/preloader v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/render-link v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/social-share v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/gallery-slider v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/gzip-caching v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/icons/font-awesome v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/images v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/modal v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/pwa v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/search v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/basic-seo v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/site-verifications v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/button v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/codepen v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/notice v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/tab v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/videos v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/accordion v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/adsense v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/cookie-consent v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/custom-script v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/preloader v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/render-link v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/social-share v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/gallery-slider v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/gzip-caching v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/icons/font-awesome v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/images v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/modal v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/pwa v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/search v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/basic-seo v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/site-verifications v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/button v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/codepen v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/notice v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/tab v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/videos v0.0.0-20230618103508-54805e19264d // indirect
|
||||
)
|
||||
|
@ -8,7 +8,7 @@
|
||||
"dev": "cd exampleSite; hugo server || hugo server --themesDir ../..",
|
||||
"test": "cd exampleSite; hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify || hugo server --themesDir ../.. --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify",
|
||||
"build": "cd exampleSite; hugo --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic || hugo --themesDir ../.. --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic",
|
||||
"update-modules": "hugo mod clean && hugo mod get -u ./... && hugo mod tidy",
|
||||
"update-modules": "node ./scripts/cleanMod.js && hugo mod clean --all && hugo mod get -u ./... && hugo mod tidy",
|
||||
"format": "prettier -w .",
|
||||
"remove-darkmode": "node ./scripts/removeDarkmode.js && yarn format"
|
||||
},
|
||||
|
@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "hugoplate",
|
||||
"description": "hugo tailwindcss boilerplate",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"license": "MIT",
|
||||
"author": "zeon.studio",
|
||||
"scripts": {
|
||||
"dev": "cd exampleSite; hugo server || hugo server --themesDir ../..",
|
||||
"test": "cd exampleSite; hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify || hugo server --themesDir ../.. --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify",
|
||||
"build": "cd exampleSite; hugo --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic || hugo --themesDir ../.. --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic",
|
||||
"update-modules": "hugo mod clean && hugo mod get -u ./... && hugo mod tidy",
|
||||
"update-modules": "node ./scripts/cleanMod.js && hugo mod clean --all && hugo mod get -u ./... && hugo mod tidy",
|
||||
"format": "prettier -w .",
|
||||
"remove-darkmode": "node ./scripts/removeDarkmode.js && yarn format"
|
||||
},
|
||||
|
14
scripts/cleanMod.js
Normal file
14
scripts/cleanMod.js
Normal file
@ -0,0 +1,14 @@
|
||||
const fs = require("fs");
|
||||
|
||||
const clearMode = (filePath) => {
|
||||
if (fs.existsSync(filePath)) {
|
||||
let fileContent = fs.readFileSync(filePath, "utf8");
|
||||
fileContent = fileContent.replace(/require\s*\([\s\S]*?\)/, "");
|
||||
fs.writeFileSync(filePath, fileContent, "utf8");
|
||||
} else {
|
||||
console.log("File does not exist.");
|
||||
}
|
||||
};
|
||||
|
||||
clearMode("go.mod");
|
||||
clearMode("exampleSite/go.mod");
|
Loading…
Reference in New Issue
Block a user