sciactive / pnotify

Beautiful JavaScript notifications with Web Notifications support.
https://sciactive.com/pnotify/
Apache License 2.0
3.65k stars 513 forks source link

bower.json main order #239

Closed Sempiternity87 closed 6 years ago

Sempiternity87 commented 8 years ago

I'm using gulp to inject my file references into the page. Because of the current order of the bower main list, pnotify.animate.js, pnotify.buttons.js, pnotify.callbacks.js, and pnotify.confirm.js are being loaded before the main pnotify.js which is causing errors when the page loads because PNotify has not been created yet. Recommend moving pnotify.js to the top of the main list.

bluespaghetti commented 8 years ago

This is still an issue.

In the meantime, you can use bower overrides in your bower.json file to override theirs.

E.G:

"overrides": {
    "pnotify": {
      "main": [
        "dist/pnotify.css",
        "dist/pnotify.js",
        "dist/pnotify.animate.js",
        "dist/pnotify.brighttheme.css",
        "dist/pnotify.buttons.css",
        "dist/pnotify.buttons.js",
        "dist/pnotify.callbacks.js",
        "dist/pnotify.confirm.js",
        "dist/pnotify.desktop.js",
        "dist/pnotify.history.css",
        "dist/pnotify.history.js",
        "dist/pnotify.mobile.css",
        "dist/pnotify.mobile.js",
        "dist/pnotify.nonblock.js"
      ]
    }
  }
hperrin commented 6 years ago

This has been fixed. Btw, PNotify 4 won't support Bower, as the generated JS is not committed. If you can, you should switch to NPM. If not, someone can fork PNotify and commit the generated files.