Differential / meteor-vulcanize

Vulcanize html imports in your meteor app.
32 stars 15 forks source link

Meteor crash if others packages want to handle .json file #15

Closed atoy40 closed 9 years ago

atoy40 commented 9 years ago

Hello,

To handle vulcanize.json file, you added a ".json" source handler. It is a problem if you want to use it with other package handling a .json file too (for example mquandalle:bower which handle bower.json) mquandalle:bower use a little trick (https://github.com/mquandalle/meteor-bower/blob/master/plugin/handler.js#L212) but it becomes with his problems too (you cannot register two times json extention for example, so you cannot use the trick in more than one package).

the meteor registerBuildPlugin() function is - as documented - waiting for extentions, not filename, so what do you think of using a specific extention (.vulcanize or any...) ? it can removed all problems.

Anthony.

schnie commented 9 years ago

Gotcha, yea I used to be able to watch for "imports.html", but wasn't able to watch "vulcanize.json", so I opted to just watch for ".json" and filter for the one we cared bout. I'm fine with changing it to watch for ".vulcanize".

On Wed, Jun 17, 2015 at 9:20 AM, Anthony Hinsinger <notifications@github.com

wrote:

Hello,

To handle vulcanize.json file, you added a ".json" source handler. It is a problem if you want to use it with other package handling a .json file too (for example mquandalle:bower which handle bower.json) mquandalle:bower use a little trick ( https://github.com/mquandalle/meteor-bower/blob/master/plugin/handler.js#L212) but it becomes with his problems too (you cannot register two times json extention for example, so you cannot use the trick in more than one package).

the meteor registerBuildPlugin() function is - as documented - waiting for extentions, not filename, so what do you think of using a specific extention (.vulcanize or any...) ? it can removed all problems.

Anthony.

— Reply to this email directly or view it on GitHub https://github.com/Differential/meteor-vulcanize/issues/15.

atoy40 commented 9 years ago

Yes, you've been able to do it with imports.html because meteor already define a html handler (this is the bower package trick with json)

atoy40 commented 9 years ago

May be it's a good idea to have a handler for vulcanize extention, but continue to filter for a specific filename (config.vulcanize ?) to avoid a user to use two .vulcanize file in the app tree ?