Skip to content

lucas-lm/create-md

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

💁 Create Markdown

Create docs with a simple command

GitHub last commit License GitHub repo size

📌 Table of Contents


🔭 Overview

This simple CLI helps you to bootstrap a nice readme and licenses from the scratch.

This readme was bootstrapped with create-md!

See a short demo below:

demo

And this is how a profile readme created with create-md looks like:

profile readme example

If you want to see more examples, take a look at examples

What can I do with create-md?

Using the create-md CLI you can:

  1. Create readme.md to your code
  2. Create readme.md to your profile
  3. Create license for your project

Why did I make this?

Creating nice readmes, license and other docs for applications can be really boring, but it is an important step to make your project more understandable. In order to make this task easier, I create this CLI to automate the process of bootstrapping my readme and some other docs like licenses and issues templates.

🔧 Requirements

⚡ Quick start

There is no need to install the package. With modern versions of yarn and npm there is no need to install the package. You can run it directly with yarn create and npm init.

If you use yarn:

yarn create md

If you prefer npm:

npm init md

Creating license:

yarn create md license
npm init md license

Hint: A well filled package.json helps the CLI to infer some default answers. Look an example below:

package.json example

🎉 Usage

Call the CLI using yarn create md <args> or npm init md <args>. The create-md CLI take only one argument (template) and some options. If it is called with no argument, the default template will be used (readme). See below the list of available templates:

  • readme (default)
  • readme/profile (profile readme)
  • license (MIT license)
  • license/bsd2 (BSD2 license)

The table below describes the options available currently.

Flag What is it? What does it do? Default value
--ext File extension Set the extension of the output file to the given value. .md
--name File name Set the name of the output file to the given value. template's name
--outDir Output folder Set the folder for the output file. cwd (current directory)

Examples

Note: yarn create can be replaced by npm init in the examples.

Creating a readme named foo inside a folder named docs:

yarn create md readme --name=foo --outDir=docs

Creating a license with txt extension

yarn create md license --ext=txt

See more examples in docs/examples.

✨ Features

  • Generate md files
  • Answer inference
  • Modular templates

💻 Techs

Curious about technologies behind create-md? It is all about:

  • NodeJS - A JavaScript runtime built on Chrome's V8 JavaScript engine
  • TypeScript - Typed JavaScript at Any Scale
  • Gluegun - A delightful toolkit for building Node-based CLIs

🌟 Contributing

Contributions, issues and feature requests are welcome!

  • ⭐️ Star the project
  • 🐛 Find and report issues
  • 📥 Submit PRs to help solve issues or add features

Feel free to check issues page. You can also take a look at the contributing guide.

💣 Next steps

  • Refactor the basecode
  • Feature: ask if user want to overwrite files if already exists
  • Feature: Auto generate table of contents
  • Write tests
  • Feature: take custom templates as argument
  • Create more templates: gitignore, issues etc.
  • Feature: flag --all must create default markdowns (readme, license, issues etc.) in batch
  • Feature: flag --yes must skip questionaire and get only default (inferred) answers
  • Allow .create-md (maybe .cmrc or .createmdrc, who knows...) config file

:octocat: Author

Lucas Miranda

📕 License

Copyright © 2020 Lucas Miranda This project is MIT licensed.