Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

materialize is not loaded by plugin #2

Open
manuel-guilbault opened this issue Jun 2, 2015 · 12 comments
Open

materialize is not loaded by plugin #2

manuel-guilbault opened this issue Jun 2, 2015 · 12 comments
Labels

Comments

@manuel-guilbault
Copy link
Owner

No description provided.

@tlvenn
Copy link

tlvenn commented Jun 2, 2015

Was about to ask if there was any reason why there is no dependency on materialize-css :)

@manuel-guilbault
Copy link
Owner Author

Just didn't have time to do it :)

@manuel-guilbault
Copy link
Owner Author

@tlvenn if you know how to work with shims and systemjs, I could use a hand: I can't figure out how to make it work

@tlvenn
Copy link

tlvenn commented Jun 10, 2015

Bonjour Manuel,

It seems someone tried already to load Materialize with jspm and Guy Bedford helped figure out how to do this properly:
jspm/registry#224

That being said, from what I can tell, Materialize has more dependencies than just Jquery. Reading Dogfalo/materialize#634 it seems that there are 3 dependencies in total:

  • JQuery
  • HammerJS
  • Velocity

Using the pointers from the first link, I hope it should now be easy to shim properly Materialize.

@tlvenn
Copy link

tlvenn commented Jun 10, 2015

Given that Materialize is in the jspm registry already, I am not sure much is needed anymore...

http://kasperlewau.github.io/registry/#/?q=materialize

@tlvenn
Copy link

tlvenn commented Jun 10, 2015

Or not given it only declare Jquery as dependency...
https://github.com/jspm/registry/blob/master/package-overrides/github/Dogfalo/materialize%400.96.1.json

Probably need to create a PR to update this.

@manuel-guilbault
Copy link
Owner Author

It now works as a JSPM dependency. The only thing I don't really like is that the Materialize object is still put on the global scope, and is not exported. I'll take some time to check the links you provided, and see if I can fix this.

Thanks for your help, and if you wish to contribute more, PRs are welcome :)

@tlvenn
Copy link

tlvenn commented Jun 27, 2015

Will do, maybe we could create an issue with a todo list of the materialize components that need attention to leverage aurelia bindings. Might be a good starting point. Kind of a roadmap.

Getting back to dependencies, i checked and velocty/hammerJs are actually inlined in materialize js which left us with Jquery alone as external dependency. If you are using either of those 2 libs, you will end up with twice the code for those...

@manuel-guilbault
Copy link
Owner Author

The roadmap is a good idea; I'll create a wiki page for this.

As for materialize's dependencies, it's not ideal, but there's not much we can do about it. We can either deal with it or stop using the javascript part of materialize and implement all the widgets ourselves from scratch. I don't think that second option is worth the effort for now. Let's deal with this issue later.

@tlvenn
Copy link

tlvenn commented Jul 19, 2015

Yes, trying to see if we can get Materialize to push a minimal lib with no dependencies at all. Then with Jspm override, we can declare those dependencies and point to that file as the main file.

@manuel-guilbault
Copy link
Owner Author

Great!

@tlvenn
Copy link

tlvenn commented Jul 19, 2015

For reference: Dogfalo/materialize#1741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants