Skip to content

Commit 07e082c

Browse files
committed
fix smui-theme with proxy
1 parent c0fa871 commit 07e082c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/smui-theme/bin/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const sass = require('sass');
44
const fetch = require('node-fetch');
55
const yargs = require('yargs/yargs');
66
const { hideBin } = require('yargs/helpers');
7+
const HttpsProxyAgent = require('https-proxy-agent');
78

89
yargs(hideBin(process.argv))
910
.command(
@@ -113,7 +114,10 @@ yargs(hideBin(process.argv))
113114
const themeSource = await fetch(
114115
`https://raw.githubusercontent.com/hperrin/svelte-material-ui/master/packages/site/src/theme/${
115116
dark ? 'dark/' : ''
116-
}_smui-theme.scss`
117+
}_smui-theme.scss`,
118+
{
119+
agent: process.env['https_proxy'] ? new HttpsProxyAgent(process.env['https_proxy']): undefined
120+
}
117121
).then((result) => result.text());
118122

119123
if (!themeSource) {

packages/smui-theme/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
},
7474
"dependencies": {
7575
"@material/theme": "^14.0.0",
76+
"https-proxy-agent": "^5.0.1",
7677
"node-fetch": "^2.6.7",
7778
"sass": "^1.54.0",
7879
"yargs": "^17.5.1"

0 commit comments

Comments
 (0)