Skip to content

Commit

Permalink
Add build script into Makefile (#16)
Browse files Browse the repository at this point in the history
#### What this PR does?

Add build script into Makefile to build the theme conviniently. See README.md for more.

/kind feature

```release-note
None
```
  • Loading branch information
JohnNiang authored Nov 14, 2022
1 parent 4bbabe6 commit aad17d4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ node_modules

.gradle
build
dist
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
build: clean
echo "Building theme"
pnpm install
pnpm build
echo "Theme built successfully!"
echo "Collect theme dist"
mkdir dist
cp -r templates dist
cp theme.yaml settings.yaml README.md dist

clean:
echo "Clean dist folder"
rm -rf dist
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# theme-earth

Default theme for Halo 2.0(WIP)

## Build theme

> If you are using Windows OS, please install `make` command and execute `make` in Git Bash or WSL.
- Execute command `make build` to generate dist folder
- Zip the dist folder and upload to your Halo
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This script is only for IntelliSense of thymeleaf.
plugins {
id 'java'
}
Expand All @@ -11,4 +12,4 @@ repositories {

dependencies {
implementation('org.thymeleaf:thymeleaf:3.0.12.RELEASE')
}
}

0 comments on commit aad17d4

Please sign in to comment.