Please check if your PR fulfills the following requirements:
[x] Docs have been reviewed and added / updated if needed (for bug fixes / features)
[x] Build (npm run build) was run locally and any changes were pushed
[x] Tests (npm test) were run locally and passed
[x] Prettier (npm run prettier) was run locally and passed
Pull request type
Please check the type of change your PR introduces:
- [ ] Bugfix
- [x] Feature
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):
## What is the current behavior?
Users are unable to pull stater templates from on-prem instnaces of github
add support for self hosted github repositories. when generating the url
to download a starter from, check for the appropriate environment
variables first.
there are two sources of configuration that are accepted - one at invocation
time (the command line) and one in .npmrc. see the README changes
in this commit for additional details.
Does this introduce a breaking change?
[ ] Yes
[x] No
Testing
In addition to new unit tests, this can be manually tested
Build the project - from the project root, npm ci && npm run build
Link the project (so we can invoke it with npm init later) - from the project root, npm link
Create a new directory somewhere where we don't care too much what happens to it, mkdir /tmp/on-prem-test
Copy index.js from the root of the project to your new directory
First, let's test command line invocation: stencil_self_hosted_url=https://your_self_hosted_github_repo.com node index.js component foo-bar. You should see an error like:
@tanner-reits @alicewriteswrongs can I get another round of reviews on this please? I rebased this atop the changes for checking if a starter exists or not and needed to do a smidge of rework
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally and any changes were pushednpm test
) were run locally and passednpm run prettier
) was run locally and passedPull request type
Please check the type of change your PR introduces: - [ ] Bugfix - [x] Feature - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior?Users are unable to pull stater templates from on-prem instnaces of github
GitHub Issue Number: Supersedes https://github.com/ionic-team/create-stencil/pull/45 - thanks to @gfellerph for their work on this!
What is the new behavior?
add support for self hosted github repositories. when generating the url to download a starter from, check for the appropriate environment variables first.
there are two sources of configuration that are accepted - one at invocation time (the command line) and one in
.npmrc
. see the README changes in this commit for additional details.Does this introduce a breaking change?
Testing
In addition to new unit tests, this can be manually tested
npm ci && npm run build
npm init
later) - from the project root,npm link
mkdir /tmp/on-prem-test
index.js
from the root of the project to your new directorystencil_self_hosted_url=https://your_self_hosted_github_repo.com node index.js component foo-bar
. You should see an error like:.npmrc
- deleteindex.js
locallynpm link create-stencil
from your tmp dir.npmrc
:echo stencil_self_hosted_url=https://github. > .npmrc
npm init stencil
. Expect an error message like that in step 5Other information