Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
fdcecb53
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fdcecb53
编写于
11月 16, 2017
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove package.json electronVersion
上级
3c70e7e2
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
17 addition
and
46 deletion
+17
-46
build/gulpfile.vscode.js
build/gulpfile.vscode.js
+2
-1
build/lib/electron.js
build/lib/electron.js
+1
-2
package.json
package.json
+0
-1
scripts/code-cli.bat
scripts/code-cli.bat
+3
-8
scripts/code-cli.sh
scripts/code-cli.sh
+1
-4
scripts/code.bat
scripts/code.bat
+3
-8
scripts/code.sh
scripts/code.sh
+1
-4
scripts/env.ps1
scripts/env.ps1
+1
-1
scripts/env.sh
scripts/env.sh
+1
-1
scripts/node-electron.sh
scripts/node-electron.sh
+1
-5
scripts/test.bat
scripts/test.bat
+2
-7
scripts/test.sh
scripts/test.sh
+1
-4
未找到文件。
build/gulpfile.vscode.js
浏览文件 @
fdcecb53
...
...
@@ -33,6 +33,7 @@ const crypto = require('crypto');
const
i18n
=
require
(
'
./lib/i18n
'
);
const
glob
=
require
(
'
glob
'
);
const
deps
=
require
(
'
./dependencies
'
);
const
getElectronVersion
=
require
(
'
./lib/electron
'
).
getElectronVersion
;
const
productionDependencies
=
deps
.
getProductionDependencies
(
path
.
dirname
(
__dirname
));
const
baseModules
=
Object
.
keys
(
process
.
binding
(
'
natives
'
)).
filter
(
n
=>
!
/^_|
\/
/
.
test
(
n
));
...
...
@@ -123,7 +124,7 @@ gulp.task('minify-vscode', ['clean-minified-vscode', 'optimize-index-js'], commo
const
darwinCreditsTemplate
=
product
.
darwinCredits
&&
_
.
template
(
fs
.
readFileSync
(
path
.
join
(
root
,
product
.
darwinCredits
),
'
utf8
'
));
const
config
=
{
version
:
packageJson
.
electronVersion
,
version
:
getElectronVersion
()
,
productAppName
:
product
.
nameLong
,
companyName
:
'
Microsoft Corporation
'
,
copyright
:
'
Copyright (C) 2017 Microsoft. All rights reserved
'
,
...
...
build/lib/electron.js
浏览文件 @
fdcecb53
...
...
@@ -21,9 +21,8 @@ module.exports.getElectronVersion = getElectronVersion;
// returns 0 if the right version of electron is in .build/electron
if
(
require
.
main
===
module
)
{
const
version
=
getElectronVersion
();
console
.
log
(
version
);
const
versionFile
=
path
.
join
(
root
,
'
.build
'
,
'
electron
'
,
'
version
'
);
const
isUpToDate
=
fs
.
existsSync
(
versionFile
)
&&
fs
.
readFileSync
(
versionFile
,
'
utf8
'
)
===
`v
${
version
}
`
;
process
.
exit
(
isUpToDate
?
0
:
1
);
}
package.json
浏览文件 @
fdcecb53
{
"name"
:
"code-oss-dev"
,
"version"
:
"1.19.0"
,
"electronVersion"
:
"1.7.9"
,
"distro"
:
"4120b819fd97e23adef120e48ceaa7d47c213c2c"
,
"author"
:
{
"name"
:
"Microsoft Corporation"
...
...
scripts/code-cli.bat
浏览文件 @
fdcecb53
...
...
@@ -13,14 +13,9 @@ set NAMESHORT=%NAMESHORT: "=%
set NAMESHORT=
%NAMESHORT
:"
=
%
.exe
set
CODE
=
".build\electron\
%NAMESHORT%
"
for
/f
"tokens=2 delims=:,"
%%a
in
(
'findstr /R /C:"\"electronVersion\":.*" package.json'
)
do
set
DESIREDVERSION
=
%%~a
set
DESIREDVERSION
=
%DESIREDVERSION
:
"=
%
set DESIREDVERSION=v
%DESIREDVERSION
:"
=
%
if
exist
.\.build\electron\version
(
set
/p
INSTALLEDVERSION
=<
.\.build\electron\version
)
else
(
set
INSTALLEDVERSION
=
""
)
:: Get electron
if
not
exist
%CODE%
node
.\node_modules\gulp\bin\gulp.js
electron
if
not
"
%INSTALLEDVERSION%
"
==
"
%DESIREDVERSION%
"
node
.\node_modules\gulp\bin\gulp.js
electron
:: Download Electron if needed
node
build
\lib\electron.js
if
%errorlevel%
neq
0
node
.\node_modules\gulp\bin\gulp.js
electron
:: Build
if
not
exist
out
node
.\node_modules\gulp\bin\gulp.js
compile
...
...
scripts/code-cli.sh
浏览文件 @
fdcecb53
...
...
@@ -18,14 +18,11 @@ function code() {
CODE
=
".build/electron/
$NAME
"
fi
INTENDED_VERSION
=
"v
`
node
-p
"require('./package.json').electronVersion"
`
"
INSTALLED_VERSION
=
`
cat
.build/electron/version 2> /dev/null
`
# Node modules
test
-d
node_modules
||
yarn
# Get electron
(
test
-f
"
$CODE
"
&&
[
$INTENDED_VERSION
==
$INSTALLED_VERSION
])
||
./node_modules/.bin/gulp electron
node build/lib/electron.js
||
./node_modules/.bin/gulp electron
# Build
test
-d
out
||
./node_modules/.bin/gulp compile
...
...
scripts/code.bat
浏览文件 @
fdcecb53
...
...
@@ -13,14 +13,9 @@ set NAMESHORT=%NAMESHORT: "=%
set NAMESHORT=
%NAMESHORT
:"
=
%
.exe
set
CODE
=
".build\electron\
%NAMESHORT%
"
for
/f
"tokens=2 delims=:,"
%%a
in
(
'findstr /R /C:"\"electronVersion\":.*" package.json'
)
do
set
DESIREDVERSION
=
%%~a
set
DESIREDVERSION
=
%DESIREDVERSION
:
"=
%
set DESIREDVERSION=v
%DESIREDVERSION
:"
=
%
if
exist
.\.build\electron\version
(
set
/p
INSTALLEDVERSION
=<
.\.build\electron\version
)
else
(
set
INSTALLEDVERSION
=
""
)
:: Get electron
if
not
exist
%CODE%
node
.\node_modules\gulp\bin\gulp.js
electron
if
not
"
%INSTALLEDVERSION%
"
==
"
%DESIREDVERSION%
"
node
.\node_modules\gulp\bin\gulp.js
electron
:: Download Electron if needed
node
build
\lib\electron.js
if
%errorlevel%
neq
0
node
.\node_modules\gulp\bin\gulp.js
electron
:: Build
if
not
exist
out
node
.\node_modules\gulp\bin\gulp.js
compile
...
...
scripts/code.sh
浏览文件 @
fdcecb53
...
...
@@ -18,14 +18,11 @@ function code() {
CODE
=
".build/electron/
$NAME
"
fi
INTENDED_VERSION
=
"v
`
node
-p
"require('./package.json').electronVersion"
`
"
INSTALLED_VERSION
=
`
cat
.build/electron/version 2> /dev/null
`
# Node modules
test
-d
node_modules
||
yarn
# Get electron
(
test
-f
"
$CODE
"
&&
[
$INTENDED_VERSION
==
$INSTALLED_VERSION
])
||
./node_modules/.bin/gulp electron
node build/lib/electron.js
||
./node_modules/.bin/gulp electron
# Build
test
-d
out
||
./node_modules/.bin/gulp compile
...
...
scripts/env.ps1
浏览文件 @
fdcecb53
$
env
:
npm_config_disturl
=
"https://atom.io/download/electron"
$
env
:
npm_config_target
=
(
node
-p
"require('./package.json').electronVersion
"
)
$
env
:
npm_config_target
=
(
node
"build/lib/electron.js
"
)
$
env
:
npm_config_runtime
=
"electron"
\ No newline at end of file
scripts/env.sh
浏览文件 @
fdcecb53
#!/bin/bash
export
npm_config_disturl
=
https://atom.io/download/electron
export
npm_config_target
=
$(
node
-p
"require('./package.json').electronVersion
"
)
export
npm_config_target
=
$(
node
"build/lib/electron.js
"
)
export
npm_config_runtime
=
electron
export
npm_config_cache
=
"
$HOME
/.npm-electron"
mkdir
-p
"
$npm_config_cache
"
\ No newline at end of file
scripts/node-electron.sh
浏览文件 @
fdcecb53
...
...
@@ -17,12 +17,8 @@ else
CODE
=
".build/electron/
$NAME
"
fi
INTENDED_VERSION
=
"v
`
node
-p
"require('./package.json').electronVersion"
`
"
INSTALLED_VERSION
=
$(
cat
.build/electron/version 2> /dev/null
)
# Get electron
(
test
-f
"
$CODE
"
&&
[
$INTENDED_VERSION
==
$INSTALLED_VERSION
])
||
./node_modules/.bin/gulp electron
node build/lib/electron.js
||
./node_modules/.bin/gulp electron
export
VSCODE_DEV
=
1
if
[[
"
$OSTYPE
"
==
"darwin"
*
]]
;
then
...
...
scripts/test.bat
浏览文件 @
fdcecb53
...
...
@@ -12,13 +12,8 @@ set NAMESHORT=%NAMESHORT:"=%.exe
set
CODE
=
".build\electron\
%NAMESHORT%
"
:: Download Electron if needed
for
/f
"tokens=2 delims=:,"
%%a
in
(
'findstr /R /C:"\"electronVersion\":.*" package.json'
)
do
set
DESIREDVERSION
=
%%~a
set
DESIREDVERSION
=
%DESIREDVERSION
:
"=
%
set DESIREDVERSION=v
%DESIREDVERSION
:"
=
%
if
exist
.\.build\electron\version
(
set
/p
INSTALLEDVERSION
=<
.\.build\electron\version
)
else
(
set
INSTALLEDVERSION
=
""
)
if
not
exist
%CODE%
node
.\node_modules\gulp\bin\gulp.js
electron
if
not
"
%INSTALLEDVERSION%
"
==
"
%DESIREDVERSION%
"
node
.\node_modules\gulp\bin\gulp.js
electron
node
build
\lib\electron.js
if
%errorlevel%
neq
0
node
.\node_modules\gulp\bin\gulp.js
electron
:: Run tests
%CODE%
.\test\electron\index.js
%
*
...
...
scripts/test.sh
浏览文件 @
fdcecb53
...
...
@@ -18,14 +18,11 @@ else
CODE
=
".build/electron/
$NAME
"
fi
INTENDED_VERSION
=
"v
`
node
-p
"require('./package.json').electronVersion"
`
"
INSTALLED_VERSION
=
$(
cat
.build/electron/version 2> /dev/null
)
# Node modules
test
-d
node_modules
||
yarn
# Get electron
(
test
-f
"
$CODE
"
&&
[
$INTENDED_VERSION
==
$INSTALLED_VERSION
])
||
./node_modules/.bin/gulp electron
node build/lib/electron.js
||
./node_modules/.bin/gulp electron
# Unit Tests
export
ELECTRON_ENABLE_LOGGING
=
1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录