https://github.com/chruxin/merge-md
Merge files in a directory. https://www.npmjs.com/package/merge-md
https://github.com/chruxin/merge-md
Last synced: 5 months ago
JSON representation
Merge files in a directory. https://www.npmjs.com/package/merge-md
- Host: GitHub
- URL: https://github.com/chruxin/merge-md
- Owner: chruxin
- License: mit
- Created: 2017-08-11T01:43:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-23T23:38:19.000Z (about 6 years ago)
- Last Synced: 2024-11-18T22:39:57.597Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 8
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - chruxin/merge-md - Merge files in a directory. https://www.npmjs.com/package/merge-md (JavaScript)
README
# merge-md 
[](https://www.npmjs.com/package/merge-md)
Once upon a time there is a computer science student. She has been taking notes in markdown for a summer course. Now it's almost final time, and she wants to merge all of her markdown notes into a single file.
Because she is a computer science student, instead of doing it in 5 mins by copying and pasting, she chooses to spend 30 minutes writing a package to do the work (and ~~possibly~~ another ~~10~~ 30 minutes publishing on npm). Ah, a computer science student.
## Installation
### Install from npm/yarn
```bash
$ npm install -g merge-md
```or
```bash
$ yarn global add merge-md
```to install globally.
### Clone to local
Clone this repo, `cd` into it, and then run
```bash
$ npm link
```## Usage
This package will merge all the files in a directory into one file called `merged.md` or `merged.mdx`.
It now works for markdown files, but should really work for plain text and code files.
### Provide directory
```bash
$ merge path/to/directory
```This merges all the files in `path/to/directory`.
Don't know what directory you want? Try running `$ pwd` inside the folder you want.
### No provided directory
```bash
$ merge
```This merges all the files in the directory where this command is run.
### Options
```bash
$ merge -mdx
```
This changes output file extension from '.md' to '.mdx'```bash
$ merge -no-file-info
```
This disables file info comments of merged files in output file
## LicenseCopyright 2017 Mandy Chen
Licensed under [MIT](./license)