Skip to content
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

Merged
merged 6 commits into from
Apr 17, 2018
Merged

Add a template #84

merged 6 commits into from
Apr 17, 2018

Conversation

snoyberg
Copy link
Collaborator

This is intended for usage with stack new. The code here is certainly up for improvement.

@@ -0,0 +1,30 @@
Copyright Author name here (c) 2018
Copy link
Contributor

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

@mgsloan
Copy link
Contributor

mgsloan commented Apr 16, 2018

LGTM. I like the make-template.hs stuff. It's kinda humorous to use T.replace to substitute in mustache templates - templating your templates!


dependencies:
- base >= 4.10 && < 5
- rio >= 0.1.1.0 && < 0.2
Copy link
Contributor

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?

Copy link
Collaborator Author

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"
Copy link
Contributor

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 Makefiles with the wrong spacing 🎉

@snoyberg snoyberg merged commit 3a46135 into master Apr 17, 2018
@snoyberg snoyberg deleted the template branch April 17, 2018 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants