Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/willdoescode/ctp
Create That Project. Project Creation That Rocks πΈπ§±.
https://github.com/willdoescode/ctp
project rust template
Last synced: 2 months ago
JSON representation
Create That Project. Project Creation That Rocks πΈπ§±.
- Host: GitHub
- URL: https://github.com/willdoescode/ctp
- Owner: willdoescode
- Created: 2021-11-01T21:10:29.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-13T16:03:52.000Z (5 months ago)
- Last Synced: 2024-10-31T12:09:29.436Z (2 months ago)
- Topics: project, rust, template
- Language: Rust
- Homepage:
- Size: 167 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Create That Project
![example workflow](https://github.com/willdoescode/ctp/actions/workflows/rust.yml/badge.svg)
![example](./assets/e.png)
[Config Example](./.ctp.example.toml)
### Install
```console
$ 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](https://github.com/willdoescode/ctp/blob/main/proj-example/main.c) for why this is useful.
### Basic setup
Create `~/.ctp.toml` and populate with the following:
```toml
[templates][commands-before]
[commands-after]
```Next, add the absolute path to a language template under `templates`
```toml
[templates]
c = ""
```Finally, add whatever commands you would like to run like so:
```toml
[commands-before]
c = ["echo \"Creating project called {{_NAME__}} in directory {{__OUT__}}\""][commands-after]
c = ["gcc -o {{__NAME__}} {{__NAME__}}.c", "./{{__NAME__}}"]
```