I launched this fork from donatj/CsvToMarkdownTable and heartily encourage anyone and everyone to fork this repo and do with it as they please. This was the first open source project that I contributed to and the first I forked and felt proud of the finished state I brought it to.
If you have an improvement and are interested in contributing to this repo here are the steps that need to be taken. Look for existing issues with the help wanted tag if you don't have an idea but would like to contribute.
- Find or create a detailed issue to describe the feature, enhancement or bug
- Fork this repository
- Setup your new forked repository on your local machine
- Write your tests and add them to
/test/
That's right kids, we're advocating for some TDD here - Make your changes to the source files in
/src/
Never make changes directly to files in/lib/
, that's tsc's job - Run all required tests and scripts
- Commit and push changes to GitHub
- Submit a pull request
- Wait for a response
Requirements
- Node.js should be installed on your local machine
Steps
- Clone the repo terriann/CsToPlainTextTable (or fork and use your repository)
- Open the folder in your editor of choice I recommend Visual Studio Code; it's what I use to maintan the project
- Through a terminal, in the project's working directory, run
npm install
If you choose to submit a pull request I politely request that you do the following before submitting it.
npm run lint
npm run test
npm run cover
But why?
npm run lint
The lint script (which uses tslint) will check to make sure that your changes adhere to the same code style that the rest of the library does. Using a modern IDE, like Visual Studio Code makes it easy to see when you've created a stylistic deviation.
npm run test
This has two actions tied to it. First it will build JavaScript (in ES3 based on the current configurations in tsconfig.json
) from the source files then upon successful compilation mocha tests are run against the finished library.
npm run cover
If you've been a good dev andyou wrote your tests first you can see already by running npm run test
that your code successfully does the thing you wanted it to do, using Istanbul will tell you how much of the existing (and new) code isnt' covered by the existing tests.
My goal with this project is to maintain > 95% code coverage.
I don't have a great process down for this yet. More coming soon.
Script | Cmd | Description |
---|---|---|
cover | npm run cover |
Runs a check to see where there are coverage gaps in the existing tests |
coveralls | npm run coveralls |
Runs the coverage script and reports output to the project on Coveralls.io |
lint | npm run lint |
Verifies that the source files are following the project's coding style and helps alert to potential bug causing defects |
test | npm run test |
Triggers the TypeScript compiler and runs tests against the freshly compiled file(s) |
watch | npm run watch |
Triggers the TypeScript compiler on watch mode to compile TypeScript to Javascript each time a source file is changed |