GitHub UI integration for KS - Kernel Scheduling Method
- Download the extension from here
- Click on 'Add to Chrome'
- Go to
chrome://extensions
- Make sure you have Developer Mode enabled at the top
- Click Load Unpacked Extension
- Navigate to the
dist
folder and select it- Note: Do this after running
npm i
thennpm run web
ornpm run build
- Note: Do this after running
- Open up this page in firefox:
about:debugging#/runtime/this-firefox
- Click Load temporary add-on
- Select the
dist/manifest.json
file in this repo (really any file within the dist should work) more info - Go to https://github.com/Expensify/App#k2
Note: If this doesn't load you may need to run
npm run build
within the root of the repo to ensure all files have been generated properly (we don't save all of the dist directory to the repo).
Your personal access token is stored locally and securely. It is used to make basic auth calls to the GitHub API. This is so that we don't have to implement OAuth or a separate API and we can get around a lot of the rate limiting issues.
- Go to https://github.com/settings/tokens
- Generate a new token
- Give it full permission to notifications, repo and user
- Use that token when signing in to the KSv2 dashboard
git clone [email protected]:Expensify/k2-extension.git
cd k2-extension
npm i
npm run web
There are three NPM tasks to use with this project. All files are output to the dist
folder.
npm run web
- Run this when doing development. It will watch files and run all code standardizing tasks whenever the files are saved. It will build all the JS code together in an unminified version for easier debugging.npm run build
- This will also build all the JS code together but it won't watch files, it will minify the output, and will exit when finished.npm run package
- This will bundle up the files in the/dist
directory into a filedist.zip
which can be used to submit to the Chrome Store.
In order to test your changes, you need to have the extension loaded into Chrome from your local folder.
- In Chrome, go to chrome://extensions
- Make sure you have Developer Mode selected at the top
- Click on Load Unpacked Extension
- Select the
dist
folder in this repo - Now the extension should be installed and enabled
- Go to https://github.com/Expensify/App#k2 and you should see the extension working
Sometimes it is necessary to install and enable the public version of the extension. You want to take care not to have both the public extension and the local extension enabled at the same time. It will make everything run twice and you'll get a lot of DOM conflicts, plus API calls will run twice so you'll hit rate limits faster.
Be sure to do the following before pushing up your branch:
- Bump the version number in
assets/manifest.json
andassets/manifest-firefox.json
(use major.minor.patch version scheme) - Bump the version number in
package.json
andpackage-lock.json
to match - Add a new change log entry in
CHANGELOG.md
Note: Publishing KSv2 requires ring3 access. If you are not in ring 3 or below, tag your issue with the ring3
label to assign a deployer.
To publish a new version of this extension, you should follow these steps:
- Make sure the version number was bumped in
assets/manifest.json
(use major.minor.patch version scheme) - Make sure the version number in
package.json
matches - Make sure a new change log entry was added in
CHANGELOG.md
- Run
npm run build
to output the minified code in the/dist
directory - Run
npm run package
which will generate adist.zip
file
- Go to the Chrome Web Store Developer Dashboard
- Sign in with the account
[email protected]
. The password/2FA is in the ring3 vault in Password1. - Click on the K2 for Github app.
- Click on the Package tab.
- Click on Upload New Package, then choose the
dist.zip
file that was created earlier. - Click on Upload
- On the Store Listing page, copy the new version notes from CHANGELOG.md into the description field and click Save Draft
- Back on the Package tab, verify that the new version number is shown for the Draft Package.
- Back in Store Listing page, click Submit for review.
- Make sure
Publish "K2 for GitHub" automatically after it has passed review
is checked, then hit Submit for review. - Done!
https://stackoverflow.com/c/expensify/questions/7043/7044#7044
This repo uses several tools to keep the code standardized.
JS Format - Sublime plugin, use this config for your personal package settings:
{
// jsformat options
"format_on_save": true,
"jsbeautifyrc_files": true
}
Editorconfig - Use a plugin for your editor of choice
There is no configuration required as it should read the .editorconfig
file in the root of the repo
This is run via a gulp task and no confuragion required. It will use the AirBnB style guide by default.
This is run via a gulp task
This is run via a gulp task