Add prebuilt Firefox & Safari extensions
This commit is contained in:
parent
c485b144a3
commit
5f5529e75c
|
@ -1,2 +1,2 @@
|
|||
node_modules
|
||||
dist
|
||||
tmp
|
|
@ -3,24 +3,24 @@ Chrome extension to display GitHub code in tree format. Useful for developers wh
|
|||
|
||||
* Easy-to-navigate code tree like IDEs
|
||||
* Fast browsing with pjax
|
||||
* Work with both public and private repositories
|
||||
* Support private repositories (require [personal access token](#github-api-rate-limit))
|
||||
|
||||
## Install
|
||||
* Download and install [Octotree](https://chrome.google.com/webstore/detail/octotree/bkhaagjahfmjljalopjnoealnfndnagc) from the Chrome store
|
||||
* Navigate to any GitHub project (or just refresh this page as an example)
|
||||
* The code tree should show as follows:
|
||||
|
||||
![When extension is active](https://raw.githubusercontent.com/buunguyen/octotree/master/docs/screen_ext.png)
|
||||
![When extension is active](https://raw.githubusercontent.com/buunguyen/octotree/master/docs/chrome.png)
|
||||
|
||||
## GitHub API Rate Limit
|
||||
Octotree uses [GitHub API](https://developer.github.com/v3/) to retrieve repository metadata. By default, it makes unauthenticated requests to the GitHub API. However, there are two situations when requests must be authenticated:
|
||||
|
||||
* You are accessing a private repository
|
||||
* You access a private repository
|
||||
* You exceed the [rate limit of unauthenticated requests](https://developer.github.com/v3/#rate-limiting)
|
||||
|
||||
When that happens, Octotree will show the following screen to ask for your [GitHub personal access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use).
|
||||
|
||||
![Enter personal access token](https://raw.githubusercontent.com/buunguyen/octotree/master/docs/screen_token.png)
|
||||
![Enter personal access token](https://raw.githubusercontent.com/buunguyen/octotree/master/docs/token.png)
|
||||
|
||||
If you don't already have one, create one at [this page](https://github.com/settings/tokens/new). Then enter the generated token into the textbox and save.
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 401 KiB After Width: | Height: | Size: 401 KiB |
Binary file not shown.
After Width: | Height: | Size: 957 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
24
gulpfile.js
24
gulpfile.js
|
@ -3,7 +3,6 @@ var gulp = require('gulp')
|
|||
, es = require('event-stream')
|
||||
, rseq = require('gulp-run-sequence')
|
||||
|
||||
// helpers
|
||||
function pipe(src, transforms, dest) {
|
||||
if (typeof transforms === 'string') {
|
||||
dest = transforms
|
||||
|
@ -17,33 +16,32 @@ function pipe(src, transforms, dest) {
|
|||
return stream
|
||||
}
|
||||
|
||||
// tasks
|
||||
gulp.task('clean', function() {
|
||||
return pipe('./dist', [clean()])
|
||||
return pipe('./tmp', [clean()])
|
||||
})
|
||||
|
||||
gulp.task('chrome', function() {
|
||||
return es.merge(
|
||||
pipe('./src/lib/**/*', './dist/chrome/lib'),
|
||||
pipe('./src/icons/**/*', './dist/chrome/icons'),
|
||||
pipe(['./src/inject.js', './src/inject.css', './src/manifest.json'], './dist/chrome/')
|
||||
pipe('./src/lib/**/*', './tmp/chrome/lib'),
|
||||
pipe('./src/icons/**/*', './tmp/chrome/icons'),
|
||||
pipe(['./src/inject.js', './src/inject.css', './src/manifest.json'], './tmp/chrome/')
|
||||
)
|
||||
})
|
||||
|
||||
gulp.task('safari', function() {
|
||||
return es.merge(
|
||||
pipe('./src/lib/**/*', './dist/safari/octotree.safariextension/lib'),
|
||||
pipe('./src/icons/**/*', './dist/safari/octotree.safariextension/icons'),
|
||||
pipe(['./src/inject.js', './src/inject.css', './src/Info.plist'], './dist/safari/octotree.safariextension/')
|
||||
pipe('./src/lib/**/*', './tmp/safari/octotree.safariextension/lib'),
|
||||
pipe('./src/icons/**/*', './tmp/safari/octotree.safariextension/icons'),
|
||||
pipe(['./src/inject.js', './src/inject.css', './src/Info.plist'], './tmp/safari/octotree.safariextension/')
|
||||
)
|
||||
})
|
||||
|
||||
gulp.task('firefox', function() {
|
||||
return es.merge(
|
||||
pipe('./src/lib/**/*', './dist/firefox/data/lib'),
|
||||
pipe('./src/icons/**/*', './dist/firefox/data/icons'),
|
||||
pipe(['./src/inject.js', './src/inject.css', './src/firefox.js'], './dist/firefox/data'),
|
||||
pipe('./src/package.json', './dist/firefox')
|
||||
pipe('./src/lib/**/*', './tmp/firefox/data/lib'),
|
||||
pipe('./src/icons/**/*', './tmp/firefox/data/icons'),
|
||||
pipe(['./src/inject.js', './src/inject.css', './src/firefox.js'], './tmp/firefox/data'),
|
||||
pipe('./src/package.json', './tmp/firefox')
|
||||
)
|
||||
})
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@ pageMod.PageMod({
|
|||
data.url('lib/js/github.js'),
|
||||
data.url('inject.js')],
|
||||
contentStyleFile: [data.url('lib/css/jstree.css'),
|
||||
data.url('inject.css'),],
|
||||
data.url('inject.css')],
|
||||
contentScriptWhen: 'start'
|
||||
})
|
Loading…
Reference in New Issue