deanrad / meteor-package-kitchen

Easy way to create templated Meteor packages.
http://package-kitchen.meteor.com
15 stars 3 forks source link

Check in .meteor #8

Open neopostmodern opened 9 years ago

neopostmodern commented 9 years ago

I just tried to fork the repo and couldn't launch it until manually copying in a .meteor folder (that now probably misses some package dependencies...) Could you check in yours?

deanrad commented 9 years ago

The .meteor folder is there, in the example/ directory.

I just updated the README to explain this repo's file structure a bit better - if it's still not clear, PR me!

neopostmodern commented 9 years ago

I still don't quite understand it ;)

I've cloned it and started up meteor in the examples directory. It works, but changes I make are not reflected.

I've digged around and apparently the example includes the deanius:package-kitchen package from it's .meteor/packages. This makes it hard to clone & play around because for most users it will use the package from atmosphere and not the one they have just cloned, i.e. locally installed (which - to my knowledge - requires modifying the $PACKAGE_DIRS).

Then it seems unintuitive to me, that the templates are not located in the meteor app folder. Would it maybe make sense to split this into a package (that generates packages only) and an app (that uses the package that produces packages) to provide a GUI?

deanrad commented 9 years ago

Good point, and you are correct that it's harder...

At one point I moved the templates to the package - so that it could work inside of any app. That's why the example folder has so little in it, and ultimately why it's hard to update - but I have a workaround!!

If you run the script npm run dev-mode in the root folder (I assume you have NPM, otherwise you can see what that script does in package.json). It will create a packages/ subfolder of example/, and drop a symlink into it that points to the project.

Confusing, perhaps, but it allows edits that you make to take effect right away, bypassing atmosphere.

I'm very curious what you're building and if I can help. I hope that tip helps.. When done editing, run npm run release-mode which will remove the symlink, causing Meteor to download and use the Atmosphere version of the package.

I'd also love to field any suggestions for improving this !

neopostmodern commented 9 years ago

Originally, I only wanted to write a pull request for CoffeeScript support.

And then, well, I decided to propose a sort of rewrite because there was a lot of things I would change. So I started here: https://github.com/neopostmodern/meteor-package-kitchen/tree/coffeescript (I used the CoffeeScript branch since I rewrote in CoffeeScript, I'm a coffee adict)

I changed:

I felt like it cleared up some issues and dependencies, e.g. now the package model takes care of session amplify itself and the UI can be unaware of that.

You can simply clone and run meteor (that's a positive change in my opinion too) - let me know what you think and how we can merge these efforts again! (There's a good bunch of things that don't work yet, mainly because they haven't been re-implemented.)

deanrad commented 9 years ago

Hey there - I also did some work recently - I'll have to look at yours - I'm sure there are some good things we can learn by combining. I came to some of the same conclusions as you, like not using the package in the example app. I probably won't go to CS myself, because when I show people how it's done, I demo JS, but I like where you're going with that, and I'll check it out..

Thanks for the help!

deanrad commented 9 years ago

Wow - it looks great! I think we should definitely merge our work at some point. Can you pair with me in the Chicago timezone tomorrow afternoon, like 3PM CST ? I have ScreenHero, dradcliffe@opinionlab.com.. Or we can work remotely as we've been doing...

PS I have NPM stuff working, including looking up the latest version in recent commits..