1.0.0 • Published 2 years ago
extype v1.0.0
Extype
Extype is a command line tool that calculates the file type based on its extension.
motivation
while i was learning backend development, with node, i realized that there were many files that i had no idea what class they were, like workflow.yml etc...
So, i decided to create a simple command line tool that would help me solve this.
installation
can you install extype with npm:
npm install -g extype usage
when installing it globally, you can run it like this:
extype index.htmlor run it with npx:
npx extype index.htmleven in the package.json, it would look something like this:
{
"scripts": {
"get-extension": "extype"
}
}in the terminal:
npm run get-extension ./index.htmlexample
extype main.css
# output
result: main.css >> CSSbehavior
# help flag is ignored
extype index.html --helpextype ignore all positional arguments, which are after the first argument.
extype index.html --some-opt
# output
error: unsupported option, try --help to see supported optionsextype, returns an error, if it finds an incompatible flag/option, oh that it is not inside the --help command.
license
made inder MIT license
1.0.0
2 years ago