-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4da78df
commit 9a1cf11
Showing
2 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# Clean environment | ||
rm -rf dist | ||
|
||
# Build | ||
mkdir dist | ||
php src/index.php | minify --type html -o dist/index.html | ||
minify -o dist/default.css src/default.css | ||
minify -o dist/index.js src/index.js | ||
mkdir dist && cd dist | ||
|
||
# Minify static assets | ||
minify -o default.css ../src/default.css | ||
minify -o index.js ../src/index.js | ||
|
||
# Copy other assets | ||
cp src/api.php dist/api.php | ||
cp src/template.php dist/template.php | ||
cp ../src/api.php ../src/template.php ./ | ||
|
||
# Compile PHP and minify | ||
php ../src/index.php | minify --type html -o index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters