flaque / thaum Goto Github PK
View Code? Open in Web Editor NEWThaum is a simple boilerplate and scaffolding command line utility.
Home Page: https://flaque.github.io/thaum/
License: MIT License
Thaum is a simple boilerplate and scaffolding command line utility.
Home Page: https://flaque.github.io/thaum/
License: MIT License
If users enter in the wrong template or they use the command in the wrong place, it may be nice to have an "undo" command by typing:
$ thaum -u
This could be implemented by writing to a temporary file. (afero) has a function for this. In that file, you could store a checksum and the path of each file that you created.
Then, when the user calls thaum -u
, you check to see if there is a temporary file and you match the checksums of each file against the ones stored. That way we don't remove files that people have edited.
Thaum should be able to list template names instead of requiring the user to simply look in their thaum_files
folder.
I'm not sure what the command should be for this, thoughts?
But it would be nice to have the ability to have more than just the name
variable in the template.
So:
import "{{package}}"
class {{name}} {
//things
foo({{myVariable}});
}
This could be done by checking the template for {{variables}}'s and then displaying them to the user to fill in in an output.
So the "thaum" UX could be updated to show:
$ thaum myTemplate
๐ Using thaum_files at: "/Users/Flaque/myProject/thaum_files"
name : <User has entered content here>
package : <User is prompted to enter content here>
myVariable : <User will be prompted for this after they complete the previous>
Currently if thaum finds an error in the middle of creating a bunch of files, it will stop. This means that you can get half-completed templates, which is probably not good.
This can be fixed by having the compile
function in the template create a struct of paths to be created and then create them all at the end.
We could include in the template a {{titleCase name}}
and {{lowerCase name}}
which would be the uppercase'd and lowercase'd version of the name
.
For example:
"evan" -> {{lowerCase name}} -> "evan"
"Evan" -> {{lowerCase name}} -> "evan"
"Evan" -> {{titleCase name}} -> "Evan"
"evan" -> {{titleCase name}} -> "Evan"
We should use the same format as plop does so users who feel like they need more functionality can switch over to Plop easily. We shouldn't trap anyone into using thaum.
I can't see a whole lot of a reason to use goblin for testing. It adds a lot of boilerplate code. Which probably shouldn't exist in a project that's whole purpose is to remove boilerplate code.
These can be removed by testing with testify.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.