RupertJS / rupert

Your friendly full stack Javascript librarian.
https://rupertjs.io
12 stars 3 forks source link

rupert-plugin-knockout #26

Open MatthewVita opened 9 years ago

MatthewVita commented 9 years ago

David,

I'd like put this on the Rupert org soon. Some questions before that:

1) I left out testing entirely. I don't know of a defacto tdd framework for KO other than the normal candidates (karma w/ jasmine, etc). Should this be added? 2) The picture in the readme is a .png and the logo needs to be more flat. Can the designer that did the logo originally help with that?

DavidSouther commented 9 years ago

Yeah, totally! You could move it over now, if you wanted. (Project Settings -> Transfer Ownership in the Danger Zone!)

1) Perhaps in rupert-plugin-knockout/examples/, and zip that similar to the rupert-grunt examples?

2) I can work on the logo - will take the k path, use the original jacked, and merge the red color into the cup & tie.

MatthewVita commented 9 years ago

will do.

DavidSouther commented 9 years ago

For 2 - https://github.com/RupertJS/rupert/blob/master/src/assets/logos/Rupert_Knockout.svg

MatthewVita commented 9 years ago

Wow, the svg looks great!

So I'm setting up the example (https://github.com/MatthewVita/rupert-plugin-knockout-test) for Rupert Knockout (want to get everything solidified before I move the repo over to the organization) and was wondering if there's anyway around the following (I noticed this with the vanilla versions too):

I have to do this in order for the main.js (or any file really) to access the object.

DavidSouther commented 9 years ago

I suppose you could override ScriptWatcher.renderers.js to wrap differently. Actually... and it pains me to say this... but that would be an interesting way to think about getting RequireJS support.

MatthewVita commented 9 years ago

I'd much rather go the window route in that case.

DavidSouther commented 9 years ago

Hmm. Yeah, you could also override that line to be a no-op, and have an implicit global scope. You could also wrap your code again in a Self-invoking anonymous function. Party like it's 2010, baby! Or use this instead of window, as window is passed as this to the function. Or add another module system. All this will be nicer in ES6.

MatthewVita commented 9 years ago

okay, I'll play around a bit and get back to you.

MatthewVita commented 9 years ago

okay, I looked into it and am not seeing any benefits to using this in place of window.

I think adding something like browserify would be too opinionated and we can stick to window. Obviously we have window.Templates as a vanilla default for good reasons, but what do you think about about adding in things like window.ViewModels, window.Models, window.Services, window.Controllers, etc by default as well? This would eliminate doing things like this when "exporting":

window.ViewModels = window.ViewModels || {};
window.ViewModels.PersonViewModel = PersonViewModel;
DavidSouther commented 9 years ago

I think projects should do this in a single file, global.js, that is the first file listed in the stassets.scripts.types array in server.js.

MatthewVita commented 9 years ago

that works great!

MatthewVita commented 9 years ago

dang, I'm trying to transfer over the repo and getting "You don't have admin rights to RupertJS" (once I get this moved over, I'll push the example dist in rupert-grunt, btw)

DavidSouther commented 9 years ago

If you're around this morning before 10:30 I can help with that.

On Thu, Jan 22, 2015, 21:43 Matthew Vita notifications@github.com wrote:

dang, I'm trying to transfer over the repo and getting "You don't have admin rights to RupertJS"

— Reply to this email directly or view it on GitHub https://github.com/RupertJS/rupert/issues/26#issuecomment-71139310.

MatthewVita commented 9 years ago

Is RupertJS the "username"? What rights am I missing ?

MatthewVita commented 9 years ago

bump C:

So I just committed my changes to rupert grunt fork here: https://github.com/MatthewVita/rupert-grunt/commit/434fefcdd3d314b8d072ec2bf576af4a6d757407

I'll send a PR as soon as I get rupert-plugin-knockout transferred over to the org page... what do I need to do there? Just to recap, I am using RupertJS as the username field for the transfer with no success.

DavidSouther commented 9 years ago

I'm not entirely certain what needs to happen to transfer the repo - is there a time you can spend 5 minutes on a google hangout to go through that?

MatthewVita commented 9 years ago

okay