To set up a development environment, you need the following installed:
-
Node 10, bundled with npm
-
Git, easy install using this script:
\\winxx\DevProg\Git\git_install_dev.bat
-
An IDE, Visual Studio Code recommended
After installing, get started with the following steps on a command line:
-
Clone the repository
git clone https://github.com/iTwin/ecjson2md/
-
Run either
npm install
ornpm ci
-
Build ecjson2md
npm run build
-
Run the tests and ensure they all pass
npm run test
Optionally, to generate code coverage, run
npm run cover
Only build these when all unit tests are passing after local changes.
-
Execute
npm run cli:dev
to locally install ecjson2md from the development build -
Navigate to
./test/Assets/dir/
-
Execute
ecjson2md -i ./example.json -r ./ -o ./
example.json being each json schema that has an associated markdown file.
Note that these command line steps can be done in a few mouse clicks with Github Desktop installed. Steps:
-
Stage files for commit using the normal workflow
-
Create a new local branch for the changes using
git checkout -b <branch>
-
Commit the changes to this new branch
-
Publish the branch using
git push -u origin <branch>
-
Browse to the GitHub repo and create a new pull request, using your newly created branch as the source as
master
as the destination