Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
dc4cc72a
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,发现更多精彩内容 >>
提交
dc4cc72a
编写于
1月 19, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pick up quality folder during gulp mixin
上级
a9b3b8c0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
44 addition
and
6 deletion
+44
-6
gulpfile.js
gulpfile.js
+41
-4
package.json
package.json
+3
-2
未找到文件。
gulpfile.js
浏览文件 @
dc4cc72a
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
require
(
'
events
'
).
EventEmitter
.
defaultMaxListeners
=
100
;
require
(
'
events
'
).
EventEmitter
.
defaultMaxListeners
=
100
;
var
gulp
=
require
(
'
gulp
'
);
var
gulp
=
require
(
'
gulp
'
);
var
json
=
require
(
'
gulp-json-editor
'
);
var
buffer
=
require
(
'
gulp-buffer
'
);
var
tsb
=
require
(
'
gulp-tsb
'
);
var
tsb
=
require
(
'
gulp-tsb
'
);
var
filter
=
require
(
'
gulp-filter
'
);
var
filter
=
require
(
'
gulp-filter
'
);
var
mocha
=
require
(
'
gulp-mocha
'
);
var
mocha
=
require
(
'
gulp-mocha
'
);
...
@@ -22,6 +24,7 @@ var path = require('path');
...
@@ -22,6 +24,7 @@ var path = require('path');
var
bom
=
require
(
'
gulp-bom
'
);
var
bom
=
require
(
'
gulp-bom
'
);
var
sourcemaps
=
require
(
'
gulp-sourcemaps
'
);
var
sourcemaps
=
require
(
'
gulp-sourcemaps
'
);
var
_
=
require
(
'
underscore
'
);
var
_
=
require
(
'
underscore
'
);
var
assign
=
require
(
'
object-assign
'
);
var
quiet
=
!!
process
.
env
[
'
VSCODE_BUILD_QUIET
'
];
var
quiet
=
!!
process
.
env
[
'
VSCODE_BUILD_QUIET
'
];
var
rootDir
=
path
.
join
(
__dirname
,
'
src
'
);
var
rootDir
=
path
.
join
(
__dirname
,
'
src
'
);
...
@@ -119,13 +122,28 @@ gulp.task('test', function () {
...
@@ -119,13 +122,28 @@ gulp.task('test', function () {
.
once
(
'
end
'
,
function
()
{
process
.
exit
();
});
.
once
(
'
end
'
,
function
()
{
process
.
exit
();
});
});
});
function
rebase
(
count
)
{
return
rename
(
function
(
f
)
{
var
parts
=
f
.
dirname
.
split
(
/
[\/\\]
/
);
f
.
dirname
=
parts
.
slice
(
count
).
join
(
path
.
sep
);
});
}
gulp
.
task
(
'
mixin
'
,
function
()
{
gulp
.
task
(
'
mixin
'
,
function
()
{
var
repo
=
process
.
env
[
'
VSCODE_MIXIN_REPO
'
];
var
repo
=
process
.
env
[
'
VSCODE_MIXIN_REPO
'
];
if
(
!
repo
)
{
if
(
!
repo
)
{
console
.
log
(
'
Missing VSCODE_MIXIN_REPO, skipping mixin
'
);
return
;
return
;
}
}
var
quality
=
process
.
env
[
'
VSCODE_QUALITY
'
];
// if (!quality) {
// console.log('Missing VSCODE_QUALITY, skipping mixin');
// return;
// }
var
url
=
'
https://github.com/
'
+
repo
+
'
/archive/master.zip
'
;
var
url
=
'
https://github.com/
'
+
repo
+
'
/archive/master.zip
'
;
var
opts
=
{
base
:
''
};
var
opts
=
{
base
:
''
};
var
username
=
process
.
env
[
'
VSCODE_MIXIN_USERNAME
'
];
var
username
=
process
.
env
[
'
VSCODE_MIXIN_USERNAME
'
];
...
@@ -136,11 +154,30 @@ gulp.task('mixin', function () {
...
@@ -136,11 +154,30 @@ gulp.task('mixin', function () {
}
}
console
.
log
(
'
Mixing in sources from
\'
'
+
url
+
'
\'
:
'
);
console
.
log
(
'
Mixing in sources from
\'
'
+
url
+
'
\'
:
'
);
return
remote
(
url
,
opts
)
var
all
=
remote
(
url
,
opts
)
.
pipe
(
zip
.
src
())
.
pipe
(
zip
.
src
())
.
pipe
(
rename
(
function
(
f
)
{
.
pipe
(
rebase
(
1
));
f
.
dirname
=
f
.
dirname
.
replace
(
/^
[^\/\\]
+
[\/\\]?
/
,
''
);
}))
if
(
quality
)
{
var
build
=
all
.
pipe
(
filter
(
'
build/**
'
));
var
productJsonFilter
=
filter
(
'
product.json
'
,
{
restore
:
true
});
var
mixin
=
all
.
pipe
(
filter
(
'
quality/
'
+
quality
+
'
/**
'
))
.
pipe
(
rebase
(
2
))
.
pipe
(
productJsonFilter
)
.
pipe
(
buffer
())
.
pipe
(
json
(
function
(
patch
)
{
var
original
=
require
(
'
./product.json
'
);
return
assign
(
original
,
patch
);
}))
.
pipe
(
productJsonFilter
.
restore
);
all
=
es
.
merge
(
build
,
mixin
);
}
return
all
.
pipe
(
es
.
mapSync
(
function
(
f
)
{
.
pipe
(
es
.
mapSync
(
function
(
f
)
{
console
.
log
(
f
.
relative
);
console
.
log
(
f
.
relative
);
return
f
;
return
f
;
...
...
package.json
浏览文件 @
dc4cc72a
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
"
gulp-atom-electron
"
:
"
^1.1.0
"
,
"
gulp-atom-electron
"
:
"
^1.1.0
"
,
"
gulp-azure-storage
"
:
"
^0.3.0
"
,
"
gulp-azure-storage
"
:
"
^0.3.0
"
,
"
gulp-bom
"
:
"
^1.0.0
"
,
"
gulp-bom
"
:
"
^1.0.0
"
,
"
gulp-buffer
"
:
"
0.0.2
"
,
"
gulp-concat
"
:
"
^2.6.0
"
,
"
gulp-concat
"
:
"
^2.6.0
"
,
"
gulp-cssnano
"
:
"
^2.1.0
"
,
"
gulp-cssnano
"
:
"
^2.1.0
"
,
"
gulp-filter
"
:
"
^3.0.0
"
,
"
gulp-filter
"
:
"
^3.0.0
"
,
...
@@ -59,12 +60,11 @@
...
@@ -59,12 +60,11 @@
"
gulp-sourcemaps
"
:
"
^1.6.0
"
,
"
gulp-sourcemaps
"
:
"
^1.6.0
"
,
"
gulp-symdest
"
:
"
^1.0.0
"
,
"
gulp-symdest
"
:
"
^1.0.0
"
,
"
gulp-tsb
"
:
"
~1.7.3
"
,
"
gulp-tsb
"
:
"
~1.7.3
"
,
"
gulp-tslint
"
:
"
^4.3.0
"
,
"
gulp-uglify
"
:
"
^1.4.1
"
,
"
gulp-uglify
"
:
"
^1.4.1
"
,
"
gulp-util
"
:
"
^3.0.6
"
,
"
gulp-util
"
:
"
^3.0.6
"
,
"
gulp-vinyl-zip
"
:
"
^1.1.0
"
,
"
gulp-vinyl-zip
"
:
"
^1.1.0
"
,
"
gulp-watch
"
:
"
^4.2.4
"
,
"
gulp-watch
"
:
"
^4.2.4
"
,
"
gulp-tslint
"
:
"
^4.3.0
"
,
"
tslint-microsoft-contrib
"
:
"
^2.0.0
"
,
"
innosetup-compiler
"
:
"
^5.5.60
"
,
"
innosetup-compiler
"
:
"
^5.5.60
"
,
"
istanbul
"
:
"
^0.3.17
"
,
"
istanbul
"
:
"
^0.3.17
"
,
"
jsdom-no-contextify
"
:
"
^3.1.0
"
,
"
jsdom-no-contextify
"
:
"
^3.1.0
"
,
...
@@ -80,6 +80,7 @@
...
@@ -80,6 +80,7 @@
"
rimraf
"
:
"
^2.2.8
"
,
"
rimraf
"
:
"
^2.2.8
"
,
"
sinon
"
:
"
^1.17.2
"
,
"
sinon
"
:
"
^1.17.2
"
,
"
source-map
"
:
"
^0.4.4
"
,
"
source-map
"
:
"
^0.4.4
"
,
"
tslint-microsoft-contrib
"
:
"
^2.0.0
"
,
"
uglify-js
"
:
"
2.4.8
"
,
"
uglify-js
"
:
"
2.4.8
"
,
"
underscore
"
:
"
^1.8.2
"
,
"
underscore
"
:
"
^1.8.2
"
,
"
vinyl
"
:
"
^0.4.5
"
"
vinyl
"
:
"
^0.4.5
"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录