MeteorPackaging / discussions

Ask for Meteor integration help, or discuss Meteor 3rd party library packaging
5 stars 1 forks source link

Google's Material Design Lite #33

Open Zodiase opened 8 years ago

Zodiase commented 8 years ago

Hi, I'd like to create a Meteor package for Google's Material Design Lite.

splendido commented 8 years ago

At the moment we're having some problem with autopublish.meteor.com, but we can continue to create official wrappers as long as we're keen to keep them up to date by hands...

the wrapper could look something like jspdf-core-wrapper. Would you like me to create a repository for you to wrap to original repo?

Zodiase commented 8 years ago

Currently I'm using my own repo for publishing the package but what I do for updating the wrapped library is just manually building it and copy-pasting the build files into the repo replacing the old one. I'd love to have easier ways of doing this but the thing is I need to modify the source code of the wrapped library a little bit for its build files to work with Meteor. Any suggestions?

splendido commented 8 years ago

Could those modifications be done in a stand-alone file? In case the answer is yes, the latest wrapper approach used for jspdf-core-wrapper is still valid!

Zodiase commented 8 years ago

Unfortunately I have to modify the source code of the wrapped library and do a custom build for the fixes.

Zodiase commented 8 years ago

Now I'm thinking, perhaps I could do these things in my fork of the wrapped library and the package would just wrap my fork.

splendido commented 8 years ago

Could you link to the changes you need? Some diff/comparison...

Zodiase commented 8 years ago

https://github.com/Zodiase/material-design-lite/commit/6b01daad0473a4ad9e1ff9364ef95b8767e09c81

Zodiase commented 8 years ago

I forgot exactly what the error was without this line though...

splendido commented 8 years ago

that seems something you could put also on a separate file on the wrapper repo...

Zodiase commented 8 years ago

This line has to be put inside that file almost exactly that location. Won't work before or after the file as the jspdf-core-wrapper example does. Also I don't understand what that repo is doing; meteor-pre.js defines a local window object that won't affect other files. Even if window was not available at the time of executing meteor-pre.js, it would still be unavailable for meteor-post.js as var is local to each file.

splendido commented 8 years ago

perhaps we should get rid of the var keywork inside meteor-pre.js? ...the pre/post trick is usually used for those libraries expecting to have modules.exports or window defined: cheating a little bit the Meteor closure wrapped around package load usually permit to pick up the desired objects and eventually export them...