npm install @emdaer/cliemdaer CLI
@emdaer/cli is the emdaer cli โ see the emdaer monorepo for more information
We recommend using emdaer with lint-staged and husky.
Install dependencies:
`` or with yarn:sh`
npm install --save-dev @emdaer/cli @emdaer/plugin-value-from-package lint-staged husky
` Follow the lint-staged setup instructions.sh`
yarn add @emdaer/cli @emdaer/plugin-value-from-package lint-staged husky -D
` In your lint-staged config file add an entry for emdaer:diff`
{
"scripts": {
+ "emdaer": "emdaer && git add *.md",
+ "precommit": "lint-staged"
}
}
` NOTE: In the case of a Add a diff`
module.exports = {
'*.js': ['eslint --fix', 'prettier --write', 'git add'],
+ '*.emdaer.md': ['emdaer --yes', 'git add'],
};precommit hook (or CI/other automation), we donโt want to be prompted about anything. The --yes flag will automatically answer โyesโ to any prompts. For example, it will make emdaer write your READMEs without prompting about overwritting direct changes to a destination README file..emdaer/README.emdaer.md file:
` And give it a whirl:md`
` When you commit your changes, lint-staged will run emdaer on any emdaer can be run manually against files by providing space separated file paths:sh`
npm run emdaer*.emdaer.md files you may have changed.Manual Usage
` If emdaer is not provided a path, the default glob sh`
npm run emdaer -- .emdaer/README.emdaer.md .emdaer/CONTRIBUTING.emdaer.md.emdaer/*/.emdaer.md is searched:
`sh``
npm run emdaer
NOTE: By default, emdaer checks for existing changes to your READMEs before writing. If it detects changes, it will provide a prompt asking if you would like to overwrite the README with the newly generated content. If you accidentally edited the README directly, you will want to answer n to the prompt, move any changes to the respective .emdaer/*.emdaer.md file, and rerun emdaer. If you would like to discard those changes, answer Y to the prompt or use the --yes flag to skip the prompt all together. In both cases, emdaer will overwrite the README with the newly generated content.