Skip to content

Commit

Permalink
Merge pull request #3 from marcreichel/minified-build
Browse files Browse the repository at this point in the history
✨ Add minified build
  • Loading branch information
marcreichel committed Mar 7, 2022
2 parents e499cdb + 68b3ac1 commit 4abd450
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 8 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ on:
types: [published]

jobs:
update-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ^16.0.0
- run: npm ci
- run: npm run build
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 📦 Update compiled files
file_pattern: dist/**/*
publish-npm:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules
/.idea
marcreichel-alpine-autosize-*.tgz
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
Include the following `<script>` tag in the `<head>` of your document, just before Alpine.

```html
<script src="https://cdn.jsdelivr.net/npm/@marcreichel/alpine-autosize@latest/dist/alpine-autosize.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/@marcreichel/alpine-autosize@latest/dist/alpine-autosize.min.js" defer></script>
```

### NPM
Expand Down
2 changes: 2 additions & 0 deletions dist/alpine-autosize.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/alpine-autosize.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

145 changes: 142 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
"rollup": "^2.67.2",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-filesize": "^9.1.2",
"rollup-plugin-node-resolve": "^5.2.0"
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^7.0.2"
},
"files": [
"LICENSE",
"README.md",
"src/index.js",
"package.json",
"dist/alpine-autosize.js",
"dist/alpine-autosize.js.map"
"dist"
]
}
8 changes: 7 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
import babel from 'rollup-plugin-babel';
import filesize from 'rollup-plugin-filesize';
import resolve from 'rollup-plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';

export default {
input: 'builds/cdn.js',
output: [
{
name: 'AlpineAutosize',
file: 'dist/alpine-autosize.js',
format: 'umd',
sourcemap: true,
},
{
file: 'dist/alpine-autosize.min.js',
format: 'umd',
plugins: [terser()],
sourcemap: true,
}
],
plugins: [
resolve(),
Expand Down

0 comments on commit 4abd450

Please sign in to comment.