ctp

Crates.ioctp
lib.rsctp
version0.1.3
sourcesrc
created_at2021-11-01 22:53:40.196885
updated_at2021-11-06 04:42:37.945529
descriptionCreate The Project
homepage
repositoryhttps://github.com/willdoescode/ctp
max_upload_size
id475473
size132,924
Will (willdoescode)

documentation

README

Create That Project

example workflow

example

Config Example

Install

$ cargo install ctp

Basic Info

In any file or even in the commands sections of your config file you can place {{__NAME__}} and/or {{__OUT__}}. Both of these will be replaced by their corresponding definitions that you pass in, hence dynamic.

{{__NAME__}} corresponds to the project name you passed into ctp

{{__OUT__}} corresponds to the project output directory you passed into ctp (defaults to the project name)

See here for why this is useful.

Basic setup

Create ~/.ctp.toml and populate with the following:

[templates]

[commands-before]

[commands-after]

Next, add the absolute path to a language template under templates

[templates]
c = "<path to c template>"

Finally, add whatever commands you would like to run like so:

[commands-before]
c = ["echo \"Creating project called {{_NAME__}} in directory {{__OUT__}}\""]

[commands-after]
c = ["gcc -o {{__NAME__}} {{__NAME__}}.c", "./{{__NAME__}}"]
Commit count: 31

cargo fmt