Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alpinejs-scroll-amount

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alpinejs-scroll-amount - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

builds/cdn.js
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,
})
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc