|
@@ -1,6 +1,5 @@
|
|
|
-import { domReady, getMethods } from './utils'
|
|
|
+import { domReady, getMethods, checkForAlpine } from './utils'
|
|
|
import { createObservable } from './observable'
|
|
|
-import compareVersions from 'compare-versions';
|
|
|
|
|
|
const Spruce = {
|
|
|
stores: {},
|
|
@@ -42,7 +41,7 @@ const Spruce = {
|
|
|
},
|
|
|
|
|
|
attach() {
|
|
|
- if (!window.Alpine || ! compareVersions.compare(window.Alpine.version, '2.7.0', '>=')) {
|
|
|
+ if (! checkForAlpine()) {
|
|
|
throw new Error('[Spruce] You must be using Alpine >= 2.5.0 to use Spruce.')
|
|
|
}
|
|
|
|