Skip to content

Commit 1ead90d

Browse files
JS Delivr + build action to minify script
1 parent 388360e commit 1ead90d

File tree

2 files changed

+52
-2
lines changed

2 files changed

+52
-2
lines changed

.github/workflows/build.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build and Minify
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: [ '715.js' ] # Only run when 715.js changes
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '18'
19+
20+
- name: Install UglifyJS
21+
run: npm install -g uglify-js
22+
23+
- name: Minify JavaScript
24+
run: |
25+
# Standard minification
26+
uglifyjs 715.js -o 715.min.js -c -m
27+
28+
# Ultra minification with aggressive compression
29+
uglifyjs 715.js -o 715.ultra.min.js -c sequences=true,dead_code=true,conditionals=true,booleans=true,unused=true,if_return=true,join_vars=true,drop_console=true -m
30+
31+
echo "Original size: $(wc -c < 715.js) bytes"
32+
echo "Standard minified: $(wc -c < 715.min.js) bytes"
33+
echo "Ultra minified: $(wc -c < 715.ultra.min.js) bytes"
34+
echo "Standard gzipped: $(gzip -c 715.min.js | wc -c) bytes"
35+
echo "Ultra gzipped: $(gzip -c 715.ultra.min.js | wc -c) bytes"
36+
37+
- name: Commit minified files
38+
run: |
39+
git config --local user.email "[email protected]"
40+
git config --local user.name "GitHub Action"
41+
git add 715.min.js 715.ultra.min.js
42+
git diff --staged --quiet || git commit -m "Auto-minify: Update minified files"
43+
git push

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,20 @@ A lightning-fast, zero-dependency reactive JavaScript framework with no fluff, j
1010
**🔧 Zero Dependencies** - Pure JavaScript, no external libraries required
1111
**💾 Built-in Persistence** - Automatic localStorage and sessionStorage support
1212
**🎯 Minimal Setup** - Works directly in browsers with no build process
13-
**📦 Tiny Size** - Under 5KB minified
13+
**📦 Tiny Size** - 3.6KB minified, 1.3KB gzipped
1414

1515
## Quick Start
1616

1717
### 1. Include the Framework
1818
```html
19-
<script src="715.js"></script>
19+
<!-- Latest version (auto-updates) -->
20+
<script src="https://cdn.jsdelivr.net/gh/fabienbrocklesby/715-Framework@main/715.ultra.min.js"></script>
21+
22+
<!-- Or use a specific version (recommended for production) -->
23+
<script src="https://cdn.jsdelivr.net/gh/fabienbrocklesby/[email protected]/715.ultra.min.js"></script>
24+
25+
<!-- Or download locally -->
26+
<script src="715.ultra.min.js"></script>
2027
```
2128

2229
### 2. Create Variables (Minimal JavaScript)

0 commit comments

Comments
 (0)