Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
Closed
gustavohenke opened this issue Aug 21, 2013 · 15 comments
Closed

[email protected] #18

gustavohenke opened this issue Aug 21, 2013 · 15 comments

Comments

@gustavohenke
Copy link

Hey,
I'd just like to remember you guys that [email protected] is about to be released. So when it gets released, grunt-swig can keep up-to-date with the amazing new features ;)

@ghost ghost assigned nickpack Aug 21, 2013
@nickpack
Copy link
Collaborator

Started to look at this tonight.

@rtgibbons - We'll need to have a discussion about this as swig 1.0.0 is a major BC break. For example, the init block we were passing over with the root path to the templates is gone. swig.init is gone and you cannot render compiled templates the way we currently are - This has been replaced by renderFile(tpl, context)

I'll push an experimental branch a bit later with support for 1.0.0 but we need to decide on whether or not to break BC ourselves, or support older versions of swig as well.

@nickpack
Copy link
Collaborator

Said experimental branch - the tests are failing even though the files are being created, but this is just to give a rough idea of the changes required, obviously needs doing properly rather than a quick hack, but its meant to illustrate the BC breaks - https://github.com/nickpack/grunt-swig/tree/feature/swig-1.0

@nickpack
Copy link
Collaborator

Specifically - nickpack@9802398

@rtgibbons
Copy link
Owner

Thanks - I knew this was going to be a beast, and I'm not sure we should worry about breaking backwards compatibility. I think we should get things cleaned up nice and pretty and bump to 1.0.0 to match swig.

@gustavohenke
Copy link
Author

Swig were in RC for a long time, much people already have 1.0.0 compatible code; I've been watching their repo, seen so many beta testers. I think you guys don't have to worry about backwards... But, it's your choice :)

@thisispete
Copy link

Im excited to try out the new version!! I have 2 projects using this right now, and plan on updating both. I'll be glad to share any feedback about migrating, keep up the great work!

@thisispete
Copy link

any updates on this?

@nickpack
Copy link
Collaborator

@thisispete Ryan hasnt had any time to spend on this project in a long while, and I've been busy with other things, so afraid not. I may get some time next week to work on it, but no promises.

@rtgibbons
Copy link
Owner

Yeah, sorry goes Real Live got in the way. All good stuff, relocated to Texas, promotion and family time. I'm getting back in and cleaning things up. This is near the top of my list along with grunt-cloudfiles.

@thisispete
Copy link

sounds like great stuff! I'd offer a hand but I'm afraid I'm not totally sure what's involved or where to start, and haven't really developed a grunt plugin like this before. Guess I could fork and start tinkering a little :)

@nickpack
Copy link
Collaborator

@thisispete If it helps, there is a proof of concept at: https://github.com/nickpack/grunt-swig/tree/feature/swig-1.0

@nickpack
Copy link
Collaborator

FYI, I have started work on getting this implemented, I've set it up on my jenkins instance, because frankly travis is not useful enough - https://ci.nickpack.com/job/grunt-swig/

I need to run now, but will hopefully have this release ready next week.

@nickpack
Copy link
Collaborator

@rtgibbons @thisispete @gustavohenke I have just pushed what I hope is an RC of swig 1.0 support to https://github.com/nickpack/grunt-swig/tree/develop - if you'd like to test, that would be awesome!

@nickpack
Copy link
Collaborator

@rtgibbons @thisispete @gustavohenke 2 caveats with it:

  • It assumes that source paths are 1 level for output (e.g. src/foo/bar.swig it will be output to $dest/foo/bar.html, some/dir/deeper/flibble.swig will be output to $dest/dir/deeper/flibble.html and 3rdparty/whatever/someapp/src/some/long/dir/file.swig to $dest/whatever/someapp/src/some/long/dir/file.html)
  • tplFile.path is now just the path, without the source file name - I should probably fix this before releasing it though I think this is quite subjective, as to whether or not the path or the path including the name is required.

@nickpack
Copy link
Collaborator

I've tested this with a few things I have that use it, and it seems to behave exactly as it always did so closing this - if anything comes up, please open a new issue.

Released as 0.2.0 - just hit npm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants