exercism / cfml

Exercism exercises in CFML.
https://exercism.org/tracks/cfml
MIT License
13 stars 25 forks source link

added anagram exercise #67

Closed jsteinshouer closed 6 years ago

bdw429s commented 6 years ago

This looks fantastic @jsteinshouer ! Quick question, did you use the configlet CLI to generate the readme? I need to add how to do that to the docs.

jsteinshouer commented 6 years ago

@bdw429s I created the readme manually. I wasn't aware of how to do it in the CLI. I could look into it if that would be helpful.

bdw429s commented 6 years ago

I've thought about trying to incorporate it into the task runner, but in order for it to pull any specifics in your hints.md, you'd need to have them in place already, so it really needs to be run after you've implemented the exercise. I didn't include any info for this in my screencast, mostly because I was trying to keep to the basics and I wasn't including readmes in the exercises so long as I was happy with the default. However, after a discussion this week, I actually went back and generated readmes in all the exercises just to be consistent and because they get delivered to the user's hard drive when they checkout the exercise which is nice for them to read locally.

Generating them is pretty easy. There's a little Go CLI called "configlet" that is made by the Excercism folk.
https://github.com/exercism/configlet Configlet does several things including linting the exercises as part of the Travis build to ensure all the data is correct and it can even format your config files so they're consistent. I've seriously considered remaking the readme generation bit as a task runner since it's really simple, but I haven't bothered.

Read the docs for it here. It's the configlet generate command. https://github.com/exercism/configlet#generate You can run it for a single exercise or or all the exercises in a track. It pulls the default readme from the problem-specifications repo and combines your hints.md if it exists and some other things.

jsteinshouer commented 6 years ago

Good to know. Thanks for the info. That would have caught my issue with duplicate entries in the config.json file if I had ran it prior to committing. I will look at the docs. I could take a crack at adding a task runner for generating the readme if you like.

bdw429s commented 6 years ago

Why don't you run the configlet generate to create the standard readme and I'll get this merged.

I'd be cool with rolling out own readme generation (as other tracks have done). The Go template used is documented and actually you can see it here: https://github.com/exercism/cfml/blob/master/config/exercise_readme.go.tmpl

It wouldn't be to hard to rewrite in CFML and we could make it run by default as part of the exercise scaffold and also make it a separate task runner (like I did with the test generation) so it can be run again at the end of creating the exercise if the user has added custom stuff to the hints.md and wants it included. If you take a whack at that, just send it over as another pull. You're only one pull away from your free T-shirt!! https://hacktoberfest.digitalocean.com/stats/jsteinshouer

jsteinshouer commented 6 years ago

I ran it to regenerate the readme file. I will attempt the task runner and send another pull if I get some time. Thanks for working with me on this.