Change loco-scroll version in package.json and add uppercase to import, add forEach to polyfill

This commit is contained in:
Antoine Boulanger
2019-08-08 11:18:18 -04:00
parent 9058945b1a
commit 3ed1175aaf
5 changed files with 7 additions and 7 deletions

View File

@@ -185,9 +185,9 @@ this.load = new modularLoad({
</div> </div>
``` ```
```js ```js
import locomotiveScroll from 'locomotive-scroll'; import LocomotiveScroll from 'locomotive-scroll';
this.scroll = new locomotiveScroll({ this.scroll = new LocomotiveScroll({
el: this.el, el: this.el,
smooth: true smooth: true
}); });

View File

@@ -1,5 +1,5 @@
import { module } from 'modujs'; import { module } from 'modujs';
import locomotiveScroll from 'locomotive-scroll'; import LocomotiveScroll from 'locomotive-scroll';
export default class extends module { export default class extends module {
constructor(m) { constructor(m) {
@@ -7,7 +7,7 @@ export default class extends module {
} }
init() { init() {
this.scroll = new locomotiveScroll({ this.scroll = new LocomotiveScroll({
el: this.el, el: this.el,
smooth: true smooth: true
}); });

View File

@@ -5,7 +5,7 @@
"version": "1.0.0", "version": "1.0.0",
"author": "Locomotive <info@locomotive.ca>", "author": "Locomotive <info@locomotive.ca>",
"dependencies": { "dependencies": {
"locomotive-scroll": "github:locomotivemtl/locomotive-scroll#v2", "locomotive-scroll": "*",
"modujs": "*", "modujs": "*",
"modularload": "*", "modularload": "*",
"normalize.css": "*", "normalize.css": "*",

View File

@@ -41,7 +41,7 @@
</div> </div>
<script nomodule src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.4.4/polyfill.min.js" crossorigin="anonymous"></script> <script nomodule src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.4.4/polyfill.min.js" crossorigin="anonymous"></script>
<script nomodule src="https://polyfill.io/v3/polyfill.min.js?features=fetch%2CCustomEvent%2CElement.prototype.matches" crossorigin="anonymous"></script> <script nomodule src="https://polyfill.io/v3/polyfill.min.js?features=fetch%2CCustomEvent%2CElement.prototype.matches%2NodeList.prototype.forEach" crossorigin="anonymous"></script>
<script nomodule src="assets/scripts/abortcontroller-polyfill-only.js"></script> <script nomodule src="assets/scripts/abortcontroller-polyfill-only.js"></script>
<script src="assets/scripts/vendors.js"></script> <script src="assets/scripts/vendors.js"></script>

View File

@@ -97,7 +97,7 @@
</div> </div>
<script nomodule src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.4.4/polyfill.min.js" crossorigin="anonymous"></script> <script nomodule src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.4.4/polyfill.min.js" crossorigin="anonymous"></script>
<script nomodule src="https://polyfill.io/v3/polyfill.min.js?features=fetch%2CCustomEvent%2CElement.prototype.matches" crossorigin="anonymous"></script> <script nomodule src="https://polyfill.io/v3/polyfill.min.js?features=fetch%2CCustomEvent%2CElement.prototype.matches%2NodeList.prototype.forEach" crossorigin="anonymous"></script>
<script nomodule src="assets/scripts/abortcontroller-polyfill-only.js"></script> <script nomodule src="assets/scripts/abortcontroller-polyfill-only.js"></script>
<script src="assets/scripts/vendors.js"></script> <script src="assets/scripts/vendors.js"></script>