alpinejs-scroll-amount
Advanced tools
Comparing version 1.0.1 to 1.0.2
import scrollAmount from '../src/index.js' | ||
document.addEventListener('alpine:init', () => { | ||
document.addEventListener('alpine:init', () => | ||
window.Alpine.plugin(scrollAmount) | ||
}) | ||
) |
@@ -1,1 +0,1 @@ | ||
(()=>{function o(t){t.magic("scrollAmount",()=>{let n=Math.round(window.scrollY/(document.body.offsetHeight-window.innerHeight)*100);return{scrollPx:window.scrollY,scrollPercent:n,atStart:n==0,atEnd:n==100}})}document.addEventListener("alpine:init",()=>{window.Alpine.plugin(o)});})(); | ||
(()=>{function o(t){t.magic("scrollAmount",()=>{let n=Math.round(window.scrollY/(document.body.offsetHeight-window.innerHeight)*100);return{scrollPx:window.scrollY,scrollPercent:n,atStart:n==0,atEnd:n==100}})}document.addEventListener("alpine:init",()=>window.Alpine.plugin(o));})(); |
{ | ||
"name": "alpinejs-scroll-amount", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Track the users scroll position and their progress on the page 🤿", | ||
@@ -21,4 +21,4 @@ "keywords": [ | ||
"devDependencies": { | ||
"esbuild": "^0.14.53" | ||
"esbuild": "^0.16.2" | ||
} | ||
} |
@@ -1,11 +0,9 @@ | ||
build({ | ||
entryPoints: [`builds/cdn.js`], | ||
outfile: `dist/scroll-amount.min.js`, | ||
platform: 'browser', | ||
define: { CDN: true }, | ||
buildPlugin({ | ||
entryPoints: ['builds/cdn.js'], | ||
outfile: 'dist/scroll-amount.min.js', | ||
}) | ||
build({ | ||
entryPoints: [`builds/module.js`], | ||
outfile: `dist/scroll-amount.esm.js`, | ||
buildPlugin({ | ||
entryPoints: ['builds/module.js'], | ||
outfile: 'dist/scroll-amount.esm.js', | ||
platform: 'neutral', | ||
@@ -15,8 +13,8 @@ mainFields: ['main', 'module'], | ||
function build(options) { | ||
options.define || (options.define = {}) | ||
return require('esbuild') | ||
.build({ ...options, minify: true, bundle: true }) | ||
.catch(() => process.exit(1)) | ||
function buildPlugin(buildOptions) { | ||
return require('esbuild').buildSync({ | ||
...buildOptions, | ||
minify: true, | ||
bundle: true, | ||
}) | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4474
39