Closed kylemac closed 10 years ago
This looks good, definitely agreed that the args parsing needed a little love. Is this piece tested and such? We should probably put this on travis.
Also, this might be of some interest: https://github.com/carrot/sprout/blob/master/lib/utils/accord.coffee
no tests yet - wanted to propose it before I sunk too much time. I had a sneaking suspicion you had written something like accord. I'll dig into it when I get back into this refactor
haha the complex arg parsing had started to drive me crazy. i don't think it would solve this problem exactly, just might be interesting. but yeah definitely agreed over here
Are the listed objects going to be used? As I am going through I could make the changes. Edit: I just realized you guys have 7 branches >.<
For all the targets in each deployer, the defined cargo in ship public gh-pages
would be the target, minus ignored_files correct? If so each target(if defined) is the cargo defined from arg_parser, we'd want to pass this along to each deployer if I'm not mistaken
Currently this is implemented if I'm not mistaken, the only change I made was cargo > payload
For each deployer though, the @target
== @cargo
Seems it shouldn't be renamed in a different file?
Within the gh-pages deployer for example the @config = target: null
could be @config = @cargo
if it was passed down
@HHSnopek have you had a chance to pull this down and work with it at all? I think that might make it easier to point out specific spots that you are looking to improve on : )
haha exactly what I've been doing, yet the all the branches confuse me! Could you merge working branches? I tend to start fixing something, remember there's a branch for it, switch and it works no changes necessary from me haha :smile:
Yup, no problem. You can work off master here. I've closed out all the other confusing branches I can. @kylemac quick check on the status on https://github.com/carrot/ship/tree/conf - can we remove this branch or is it something you are still working on?
Thank you very much @jenius! :grinning:
@jenius, this wasn't merged?
No, but similar changes were made in https://github.com/carrot/ship/commit/882322453033388ef86a2aafd52d451f1748d9b8
IMO, the object we're returning from the argument parser is a little confusing. I've also run into issues where I'm expecting a relative path but receive the absolute
process.cwd()
forpath
. I also tend to think thatpath
is a little bit of a confusing name in the context of the deployer.I propose the following objects:
The new objects are
cargo
andfolder
.cargo
is simply thepath
joined with thefolder
. I don't believe I've had a use-case forfolder
yet, and I'm not 100% pleased with it's naming - but it seems like down the line this operation would be necessary and it makes sense to marshall it now instead of doing a string difference ofpath
andcargo
later.