The GitHub Writer source code is available on GitHub: https://github.com/ckeditor/github-writer
To get the source code:
- On terminal, move to the folder you want to have the source code in.
- Clone the repository:
git clone https://github.com/ckeditor/github-writer.git
cd github-writer
yarn
The above will not only clone the repository but also execute yarn
so all code dependencies are downloaded.
The source code must be built, so it can be used in the browser as an extension:
- Be sure code dependencies have been downloaded (
yarn
). Run it as many times as you wish - no harm. - Execute the build script:
yarn run build
or
yarn run build-dev
The build-dev
option produces a development friendly build, while build
make it optimized for production distribution.
You'll find the build files in the newly created build/
directory. Note that this directory is silently deleted and recreated when executing the build script.
Having successfully built from source, do the following to load the extension in the browser:
-
In Chrome:
- In the menu, select Window > Extensions. Or navigate to chrome://extensions/.
- Enable Developer mode, at the top right of the page.
- Click the Load unpacked button.
- Select the
build/github-writer-chrome
directory from the build directory.
-
In Firefox:
- Navigate to about:debugging#/runtime/this-firefox.
- Click Load Temporary Add-on....
- Select the
build/github-writer-firefox/manifest.json
file from the build directory.
It's all set. Now visit https://github.com/ and start using GitHub Writer inside issues, pull request and wiki pages.
Note that Chrome will keep the extension enabled, while Firefox will remove it once the browser is closed, and the above steps must be done again.
To test changes to the source code, the following steps must always be done:
- Re-build by executing
yarn run build-dev
. - Refresh the extension in the browser:
- In Chrome:
- In the menu, select Window > Extensions. Or navigate to chrome://extensions/.
- Click the reload button (⟳).
- In Firefox:
- Navigate to about:debugging#/runtime/this-firefox.
- Click Reload.
- In Chrome:
Now just reload pages on GitHub and the updated extension will be executed.
- Tests (architecture, configuration, run).
- Architecture (source code, API).
On the web: