Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/charliewilco/mf
A nicer touch utility 🌈 👍
https://github.com/charliewilco/mf
cli filesystem touch
Last synced: about 1 month ago
JSON representation
A nicer touch utility 🌈 👍
- Host: GitHub
- URL: https://github.com/charliewilco/mf
- Owner: charliewilco
- License: unlicense
- Created: 2017-01-22T08:45:55.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2022-11-06T07:54:53.000Z (about 2 years ago)
- Last Synced: 2024-09-23T04:49:00.269Z (about 2 months ago)
- Topics: cli, filesystem, touch
- Language: JavaScript
- Homepage:
- Size: 330 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![terminal using `mf` utility](.github/og.png)
# mf (make file)
![example workflow](https://github.com/charliewilco/mf/actions/workflows/node.yml/badge.svg)
Nicer `touch` utility
## Installation & Usage
```sh
npm install --global @charliewilco/mf-cli
```Call the command `mf` and pass a single argument to it, the name and path of the file(s) you'd like create
```sh
mf ./src/components/Button.js ./src/actions/index.js
```Output:
```sh
./src/components/Button.js created 👍
./src/actions/index.js created 👍
```### Using `npx`
```sh
npx @charliewilco/mf-cli hello.ts
```## Rationale
One command line thing I need to do all the time is make a file. In Atom when you make a new file, it'll make a new directory if it doesn't exist. For example if you're in Atom and make `src/components/Button.js` and the `components` directory doesn't exist, it'll just create it by default.
But on the command line, to do this, you'd need to `mkdir src/components && touch components/Button.js` to make that happen. It's a little thing, but when you do a little thing 20 or 30 times a day, it becomes annoying. It's even worse in Vim; and honestly it's one huge thing I feel is lacking in Vim.
What I'm attempting to do here is to make a little CLI utility to do something like `mf ./src/components/Button.js`
## Development
This project is using JavaScript purely and uses `// @ts-check` to validate the project. This removes the need for a compliation step and makes testing and publishing much easier.
## License
The Unlicense