Added minification for all files on build

Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
Ari Archer 2022-08-28 23:49:48 +03:00
parent 6d7395200f
commit bb449b60bb
5 changed files with 2496 additions and 7 deletions

View file

@ -10,5 +10,6 @@ clean:
.github \
netlify: build clean
npm run netlify-min
.PHONY: build clean netlify

View file

@ -6,5 +6,13 @@
"legacy.blog.ari-web.xyz": 31.8,
"www.ari-web.xyz": 29.9
}
},
"2022-08-28": {
"total": 30.0,
"top": {
"legacy.blog.ari-web.xyz": 9.2,
"www.ari-web.xyz": 8.6,
"blog.ari-web.xyz": 7.3
}
}
}

2479
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,8 @@
"description": "My website's source code",
"scripts": {
"serve": "live-server --no-browser",
"build": "./scripts/build.sh"
"build": "./scripts/build.sh",
"netlify-min": "./scripts/netlify_prod.sh"
},
"repository": {
"type": "git",
@ -30,6 +31,7 @@
"autoprefixer-cli": "^1.0.0",
"eslint": "^8.14.0",
"live-server": "^1.2.2",
"minify-all-cli": "^1.0.13",
"node-sass": "^7.0.1"
}
}

11
scripts/netlify_prod.sh Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env sh
set -e
main() {
minify-all-cli -s . -d min --skipFileExtensions=.png --logLevel=warn
cp -r min/* .
rm -r min
}
main "$@"