https://github.com/maximilianmairinger/ctp
Create typescript project from an interactable template collection
https://github.com/maximilianmairinger/ctp
api api-client cli ctp project template typescript
Last synced: 4 months ago
JSON representation
Create typescript project from an interactable template collection
- Host: GitHub
- URL: https://github.com/maximilianmairinger/ctp
- Owner: maximilianMairinger
- Created: 2019-11-24T12:46:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-01T12:56:11.000Z (9 months ago)
- Last Synced: 2025-01-22T08:42:46.030Z (5 months ago)
- Topics: api, api-client, cli, ctp, project, template, typescript
- Language: TypeScript
- Homepage:
- Size: 715 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Create typescript project
Select an template type, answere simple setup questions, start working!
> Please not that Create typescript project is currently under development and not yet suited for production
## Get started
Install ctp globally
```
$ npm i ctp -g
```Read through the supported template [list](#Templates) and select one. `cd` to your project directory. Execute it like so (module is your selected template)
```
$ ctp module
```You can also specify a destination
```
$ ctp module --destination ./your-dir
```## Templates
As of now there is only the `module` template. A detailed table follows.
## API
### Programmatical interface
When installed locally, ctp can be executed via the default method it exports.
```js
import ctp from "ctp"ctp(/*projectKind:*/ "module",/*options:*/ {destination: "./your-dir", name: "your-project"})
.then(() => {
console.log("Done!")
})
```By default, encountered errors get thrown when using the programmatical interface. This can be disabled by calling `wrapErrors(true)` in order to have CLI like error reports.
```js
import ctp, {wrapErrors} from "ctp"wrapErrors(true)
//ctp(...)
```### CLI
All inqueried options can be given as command line arguaments as well. Only two options (namely `verbose` and `destination`) will not be inqueried if not given. Those have the defaults `verbose: true` and `destination: [current dir]`.
## Contribute
All feedback is appreciated. Write an issue or add a template by creating a pull request.