-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a template #84
Add a template #84
Conversation
etc/template/LICENSE
Outdated
@@ -0,0 +1,30 @@ | |||
Copyright Author name here (c) 2018 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be AUTHOR
not Author name here
LGTM. I like the make-template.hs stuff. It's kinda humorous to use |
etc/template/package.yaml
Outdated
|
||
dependencies: | ||
- base >= 4.10 && < 5 | ||
- rio >= 0.1.1.0 && < 0.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering why the upper-bound here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I've removed it.
readProcessStdout_ | ||
files <- mapM decode $ splitNulls $ BL.toStrict rawout | ||
let src = forM_ files $ \fp -> yield (fp, readFileBinary $ templatedir </> fp) | ||
runConduitRes $ src .| createTemplate .| sinkFile "rio.hsfiles" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh 🙀🙀🙀 this is awesome! No longer nasty huge hsfiles
, I'm copying this to my dotfiles like yesterday! No longer generating Makefile
s with the wrong spacing 🎉
This is intended for usage with
stack new
. The code here is certainly up for improvement.