Skip to content
/ template Public template

A template for creating a new template

License

Notifications You must be signed in to change notification settings

racket-templates/template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Racket Racket Discourse users Racket Discord

template-template

This repository is a a template for creating a new Racket Templates app template that can be installed with raco new <your-template-name-here>.

It comes pre-populated with some minimal configuration, but the other templates can also be used if they are a better fit for you template.

Checklist

  • Choose a licence suitable for use as a template. - we suggest MIT but the choice is yours.
  • Is the template a working example? It is important that the template is a close as possible working app with minimal (hopefully zero) configuration.
  • Change this README.md file to provide instructions for using the template
  • create a pull request at https://github.com/racket-templates/racket-templates to add your template to the collection.

The sample text below is from the cli-command template.

Best wishes,

Stephen


Racket Racket Discourse users Racket Discord

cli-command

A working example of CLI command you can use to create your own command line app.

How To Install

  1. Set your PATH environment variable so you can use raco and other Racket command line functions.
  2. either look for from-template in the DrRacket menu File|Package Manager, or run the raco command:
raco pkg install from-template
raco new cli-command <destination-dir>

If you omit <destination-dir>, the command will add copy the template to a folder called cli-command in the current folder.

How to use

This is working example that you can change to suit your needs.

If you need to create an interactive app consider using the charterm package.

How to create an executable

$ raco exe -o hello hello.rkt

This will create an executabe hello or hello.exe depending on your platform.

For help

$ ./hello -h or hello.exe -h

Creating executables: https://docs.racket-lang.org/raco/exe.html

Command-line parsing: https://docs.racket-lang.org/reference/Command-Line_Parsing.html

Testing command-line parsing:

Use the DrRacket drracket-cmdline-args plugin: https://docs.racket-lang.org/drracket-cmdline-args/

Install: raco pkg install drracket-cmdline-args

drracket-cmdline-args

About

A template for creating a new template

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages