Skip to content
This repository has been archived by the owner on Jun 2, 2021. It is now read-only.

Add support to pass a custom git repo #8

Open
CapOM opened this issue Oct 4, 2018 · 5 comments
Open

Add support to pass a custom git repo #8

CapOM opened this issue Oct 4, 2018 · 5 comments

Comments

@CapOM
Copy link

CapOM commented Oct 4, 2018

Curently support to pass a local path but that would be great to support: git+https://[email protected]/MyName/electron.git#my_branch

@CapOM
Copy link
Author

CapOM commented Oct 4, 2018

Goal: electron-typescript-definitions --in=git+https://[email protected]/MyName/electron.git#my_branch --out=node_modules/electron/electron.d.ts

@zeke
Copy link
Contributor

zeke commented Oct 4, 2018

Hi @CapOM. Would you be willing to open a PR that adds this capability?

@CapOM
Copy link
Author

CapOM commented Oct 4, 2018

I was not planing but I can try. Will it require changes only in electron-docs repo ?
Will it be a new function being a mix of electron-docs/index.js::download and readFromDisk ?
Or is there anything we can re-use as usually adding git+https://[email protected]/MyName/electron.git#my_branch in package.json just work.
Thx!

@zeke
Copy link
Contributor

zeke commented Oct 4, 2018

I'm not sure I understand your questions, but there is already a capability to read docs from the disk, so if you have your branch checked out, you can point the module at your local path:

const path = require('path')
const docsPath = path.join(__dirname, 'docs')
electronDocs(docsPath).then(function(docs) {
  // ...
})

@CapOM
Copy link
Author

CapOM commented Oct 4, 2018

No I do want read docs from a local checkout but from a custom git url (so not the default https://github.com/electron/electron-docs/blob/master/index.js#L26)

For example I am developing an app that uses electron and in MyApp/package.json I have "postinstall": "electron-typescript-definitions --out=node_modules/electron/electron.d.ts",

I want to add the param: --in=git+https://[email protected]/MyName/electron.git#my_branch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants