https://github.com/akameco/touch-alt
Create from a template instead of a new file
https://github.com/akameco/touch-alt
cli cli-app cp cp-file touch touch-alt
Last synced: about 1 year ago
JSON representation
Create from a template instead of a new file
- Host: GitHub
- URL: https://github.com/akameco/touch-alt
- Owner: akameco
- License: mit
- Created: 2017-05-12T17:15:27.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-11T17:10:26.000Z (over 7 years ago)
- Last Synced: 2025-04-03T03:51:09.688Z (about 1 year ago)
- Topics: cli, cli-app, cp, cp-file, touch, touch-alt
- Language: JavaScript
- Homepage:
- Size: 262 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# [](https://github.com/akameco/touch-alt)
[](https://travis-ci.org/akameco/touch-alt)
[](#contributors)
> Create from a template instead of a new file
## Install
```
$ npm install --global touch-alt
```
## Demo

## Usage
```
$ touch-alt --help
Create from a template instead of a new file
Usage
$ touch-alt
$ touch-alt --add
Options
-a, --add Create new template file
-o, --overwrite Overwrite by template
Example
$ touch-alt .editorconfig
```
## Example
### Add new template file
```
$ cat .editorconfig
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
$ touch-alt --add .editorconfig
```
### Usage
```
# Use touch
$ touch .editorconfig
$ cat .editorconfig
$ rm .editorconfig
# Use touch-alt
$ touch-alt .editorconfig
$ cat .editorconfig
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
```
## Tip
Add `alias touch=touch-alt` to your .zshrc/.bashrc to reduce typing & create file easily.
## Config
Default: `~/.touch-alt`
```sh
$ ls ~/.touch-alt
ISSUE_TEMPLATE.md index.js readme.md
```
## Contributors
Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
| [
akameco](http://akameco.github.io)
[💻](https://github.com/akameco/touch-alt/commits?author=akameco "Code") [📖](https://github.com/akameco/touch-alt/commits?author=akameco "Documentation") [⚠️](https://github.com/akameco/touch-alt/commits?author=akameco "Tests") [🚇](#infra-akameco "Infrastructure (Hosting, Build-Tools, etc)") | [
ryota-murakami](http://ryota-murakami.github.io/)
[🚇](#infra-ryota-murakami "Infrastructure (Hosting, Build-Tools, etc)") |
| :---: | :---: |
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
## License
MIT © [akameco](http://akameco.github.io)