Skip to content

Commit

Permalink
Remove unused imports (#4006)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdebrauwer committed Jan 29, 2024
1 parent b87d3f7 commit 77b1736
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion packages/alpinejs/src/directives/x-for.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { directive } from '../directives'
import { reactive } from '../reactivity'
import { initTree } from '../lifecycle'
import { mutateDom } from '../mutation'
import { flushJobs } from '../scheduler'
import { warn } from '../utils/warn'
import { dequeueJob } from '../scheduler'

Expand Down
1 change: 0 additions & 1 deletion packages/alpinejs/src/directives/x-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { mutateDom } from '../mutation'
import { nextTick } from '../nextTick'
import bind, { safeParseBoolean } from '../utils/bind'
import on from '../utils/on'
import { warn } from '../utils/warn'
import { isCloning } from '../clone'

directive('model', (el, { modifiers, expression }, { effect, cleanup }) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/alpinejs/src/directives/x-teleport.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { onlyDuringClone, skipDuringClone } from "../clone"
import { skipDuringClone } from "../clone"
import { directive } from "../directives"
import { addInitSelector, initTree } from "../lifecycle"
import { initTree } from "../lifecycle"
import { mutateDom } from "../mutation"
import { addScopeToNode } from "../scope"
import { warn } from "../utils/warn"
Expand Down
1 change: 0 additions & 1 deletion packages/alpinejs/src/lifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { deferHandlingDirectives, directives } from "./directives"
import { dispatch } from './utils/dispatch'
import { walk } from "./utils/walk"
import { warn } from './utils/warn'
import Alpine from "./alpine"

let started = false

Expand Down
7 changes: 3 additions & 4 deletions packages/alpinejs/src/magics.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Alpine from './alpine'
import { getElementBoundUtilities } from './directives'
import { interceptor } from './interceptor'
import { onElRemoved } from './mutation'
Expand All @@ -17,14 +16,14 @@ export function injectMagics(obj, el) {
return memoizedUtilities;
} else {
let [utilities, cleanup] = getElementBoundUtilities(el)

memoizedUtilities = {interceptor, ...utilities}

onElRemoved(el, cleanup)
return memoizedUtilities;
}
}

Object.defineProperty(obj, `$${name}`, {
get() {
return callback(el, getUtilities());
Expand Down
3 changes: 1 addition & 2 deletions packages/alpinejs/src/magics/$watch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { magic } from '../magics'
import { effect, release, watch } from '../reactivity'
import { watch } from '../reactivity'

magic('watch', (el, { evaluateLater, cleanup }) => (key, callback) => {
let evaluate = evaluateLater(key)
Expand All @@ -16,4 +16,3 @@ magic('watch', (el, { evaluateLater, cleanup }) => (key, callback) => {

cleanup(unwatch)
})

0 comments on commit 77b1736

Please sign in to comment.