Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
acd7bb92
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
acd7bb92
编写于
2月 22, 2020
作者:
J
João Moreno
提交者:
GitHub
2月 22, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #91155 from microsoft/joao/refactor-build
Refactor build
上级
33a65245
56cd2882
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
64 addition
and
66 deletion
+64
-66
build/azure-pipelines/product-compile.yml
build/azure-pipelines/product-compile.yml
+5
-5
build/lib/compilation.js
build/lib/compilation.js
+0
-12
build/lib/compilation.ts
build/lib/compilation.ts
+0
-15
build/npm/postinstall.js
build/npm/postinstall.js
+2
-4
extensions/github-authentication/build/postinstall.js
extensions/github-authentication/build/postinstall.js
+26
-0
extensions/github-authentication/package.json
extensions/github-authentication/package.json
+31
-30
未找到文件。
build/azure-pipelines/product-compile.yml
浏览文件 @
acd7bb92
...
...
@@ -77,6 +77,11 @@ steps:
yarn postinstall
displayName
:
Run postinstall scripts
condition
:
and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'), eq(variables['CacheRestored'], 'true'))
env
:
OSS_GITHUB_ID
:
"
a5d3c261b032765a78de"
OSS_GITHUB_SECRET
:
$(oss-github-client-secret)
INSIDERS_GITHUB_ID
:
"
31f02627809389d9f111"
INSIDERS_GITHUB_SECRET
:
$(insiders-github-client-secret)
# Mixin must run before optimize, because the CSS loader will
# inline small SVGs
...
...
@@ -116,11 +121,6 @@ steps:
yarn gulp minify-vscode-reh-web
displayName
:
Compile
condition
:
and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
env
:
OSS_GITHUB_ID
:
"
a5d3c261b032765a78de"
OSS_GITHUB_SECRET
:
$(oss-github-client-secret)
INSIDERS_GITHUB_ID
:
"
31f02627809389d9f111"
INSIDERS_GITHUB_SECRET
:
$(insiders-github-client-secret)
-
script
:
|
set -e
...
...
build/lib/compilation.js
浏览文件 @
acd7bb92
...
...
@@ -74,7 +74,6 @@ function compileTask(src, out, build) {
if
(
src
===
'
src
'
)
{
generator
.
execute
();
}
generateGitHubAuthConfig
();
return
srcPipe
.
pipe
(
generator
.
stream
)
.
pipe
(
compile
())
...
...
@@ -97,17 +96,6 @@ function watchTask(out, build) {
}
exports
.
watchTask
=
watchTask
;
const
REPO_SRC_FOLDER
=
path
.
join
(
__dirname
,
'
../../src
'
);
function
generateGitHubAuthConfig
()
{
const
schemes
=
[
'
OSS
'
,
'
INSIDERS
'
];
let
content
=
{};
schemes
.
forEach
(
scheme
=>
{
content
[
scheme
]
=
{
id
:
process
.
env
[
`
${
scheme
}
_GITHUB_ID`
],
secret
:
process
.
env
[
`
${
scheme
}
_GITHUB_SECRET`
]
};
});
fs
.
writeFileSync
(
path
.
join
(
__dirname
,
'
../../extensions/github-authentication/src/common/config.json
'
),
JSON
.
stringify
(
content
));
}
class
MonacoGenerator
{
constructor
(
isWatch
)
{
this
.
_executeSoonTimer
=
null
;
...
...
build/lib/compilation.ts
浏览文件 @
acd7bb92
...
...
@@ -88,8 +88,6 @@ export function compileTask(src: string, out: string, build: boolean): () => Nod
generator
.
execute
();
}
generateGitHubAuthConfig
();
return
srcPipe
.
pipe
(
generator
.
stream
)
.
pipe
(
compile
())
...
...
@@ -117,19 +115,6 @@ export function watchTask(out: string, build: boolean): () => NodeJS.ReadWriteSt
const
REPO_SRC_FOLDER
=
path
.
join
(
__dirname
,
'
../../src
'
);
function
generateGitHubAuthConfig
()
{
const
schemes
=
[
'
OSS
'
,
'
INSIDERS
'
];
let
content
:
{
[
key
:
string
]:
{
id
?:
string
,
secret
?:
string
}}
=
{};
schemes
.
forEach
(
scheme
=>
{
content
[
scheme
]
=
{
id
:
process
.
env
[
`
${
scheme
}
_GITHUB_ID`
],
secret
:
process
.
env
[
`
${
scheme
}
_GITHUB_SECRET`
]
};
});
fs
.
writeFileSync
(
path
.
join
(
__dirname
,
'
../../extensions/github-authentication/src/common/config.json
'
),
JSON
.
stringify
(
content
));
}
class
MonacoGenerator
{
private
readonly
_isWatch
:
boolean
;
public
readonly
stream
:
NodeJS
.
ReadWriteStream
;
...
...
build/npm/postinstall.js
浏览文件 @
acd7bb92
...
...
@@ -13,7 +13,7 @@ const yarn = process.platform === 'win32' ? 'yarn.cmd' : 'yarn';
* @param {*} [opts]
*/
function
yarnInstall
(
location
,
opts
)
{
opts
=
opts
||
{};
opts
=
opts
||
{
env
:
process
.
env
};
opts
.
cwd
=
location
;
opts
.
stdio
=
'
inherit
'
;
...
...
@@ -52,8 +52,6 @@ extensions.forEach(extension => yarnInstall(`extensions/${extension}`));
function
yarnInstallBuildDependencies
()
{
// make sure we install the deps of build/lib/watch for the system installed
// node, since that is the driver of gulp
//@ts-ignore
const
env
=
Object
.
assign
({},
process
.
env
);
const
watchPath
=
path
.
join
(
path
.
dirname
(
__dirname
),
'
lib
'
,
'
watch
'
);
const
yarnrcPath
=
path
.
join
(
watchPath
,
'
.yarnrc
'
);
...
...
@@ -66,7 +64,7 @@ target "${target}"
runtime "
${
runtime
}
"`
;
fs
.
writeFileSync
(
yarnrcPath
,
yarnrc
,
'
utf8
'
);
yarnInstall
(
watchPath
,
{
env
}
);
yarnInstall
(
watchPath
);
}
yarnInstall
(
`build`
);
// node modules required for build
...
...
extensions/github-authentication/build/postinstall.js
0 → 100644
浏览文件 @
acd7bb92
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const
fs
=
require
(
'
fs
'
);
const
path
=
require
(
'
path
'
);
const
schemes
=
[
'
OSS
'
,
'
INSIDERS
'
];
function
main
()
{
let
content
=
{};
for
(
const
scheme
of
schemes
)
{
const
id
=
process
.
env
[
`
${
scheme
}
_GITHUB_ID`
];
const
secret
=
process
.
env
[
`
${
scheme
}
_GITHUB_SECRET`
];
if
(
id
&&
secret
)
{
content
[
scheme
]
=
{
id
,
secret
};
}
}
fs
.
writeFileSync
(
path
.
join
(
__dirname
,
'
../src/common/config.json
'
),
JSON
.
stringify
(
content
));
}
main
();
extensions/github-authentication/package.json
浏览文件 @
acd7bb92
{
"name"
:
"github-authentication"
,
"displayName"
:
"%displayName%"
,
"description"
:
"%description%"
,
"publisher"
:
"vscode"
,
"version"
:
"0.0.1"
,
"engines"
:
{
"vscode"
:
"^1.41.0"
},
"enableProposedApi"
:
true
,
"categories"
:
[
"Other"
],
"activationEvents"
:
[
"*"
],
"main"
:
"./out/extension.js"
,
"scripts"
:
{
"vscode:prepublish"
:
"npm run compile"
,
"compile"
:
"gulp compile-extension:github-authentication"
,
"watch"
:
"gulp watch-extension:github-authentication"
},
"dependencies"
:
{
"uuid"
:
"^3.3.3"
},
"devDependencies"
:
{
"@types/keytar"
:
"^4.4.2"
,
"@types/node"
:
"^10.12.21"
,
"@types/uuid"
:
"^3.4.6"
,
"typescript"
:
"^3.7.5"
}
"name"
:
"github-authentication"
,
"displayName"
:
"%displayName%"
,
"description"
:
"%description%"
,
"publisher"
:
"vscode"
,
"version"
:
"0.0.1"
,
"engines"
:
{
"vscode"
:
"^1.41.0"
},
"enableProposedApi"
:
true
,
"categories"
:
[
"Other"
],
"activationEvents"
:
[
"*"
],
"main"
:
"./out/extension.js"
,
"scripts"
:
{
"vscode:prepublish"
:
"npm run compile"
,
"compile"
:
"gulp compile-extension:github-authentication"
,
"watch"
:
"gulp watch-extension:github-authentication"
,
"postinstall"
:
"node build/postinstall.js"
},
"dependencies"
:
{
"uuid"
:
"^3.3.3"
},
"devDependencies"
:
{
"@types/keytar"
:
"^4.4.2"
,
"@types/node"
:
"^10.12.21"
,
"@types/uuid"
:
"^3.4.6"
,
"typescript"
:
"^3.7.5"
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录