Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
303191d8
Unverified
Commit
303191d8
authored
May 24, 2019
by
Hao Nguyen
Committed by
GitHub
May 24, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6173 from haon4/cherrypick_fix_build
Fix gulpfile to use gulp 4 API
parents
95c207f2
f9cd7bd9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
gulpfile.js
js/gulpfile.js
+12
-12
package.json
js/package.json
+1
-1
No files found.
js/gulpfile.js
View file @
303191d8
...
...
@@ -144,7 +144,7 @@ function getClosureBuilderCommand(exportsFile, outputFile) {
exportsFile
+
' > '
+
outputFile
;
}
gulp
.
task
(
'dist'
,
[
'genproto_wellknowntypes'
],
function
(
cb
)
{
gulp
.
task
(
'dist'
,
gulp
.
series
(
[
'genproto_wellknowntypes'
],
function
(
cb
)
{
// TODO(haberman): minify this more aggressively.
// Will require proper externs/exports.
exec
(
getClosureBuilderCommand
(
'commonjs/export.js'
,
'google-protobuf.js'
),
...
...
@@ -153,7 +153,7 @@ gulp.task('dist', ['genproto_wellknowntypes'], function (cb) {
console
.
log
(
stderr
);
cb
(
err
);
});
});
})
)
;
gulp
.
task
(
'commonjs_asserts'
,
function
(
cb
)
{
exec
(
'mkdir -p commonjs_out/test_node_modules && '
+
...
...
@@ -179,7 +179,7 @@ gulp.task('commonjs_testdeps', function (cb) {
});
});
gulp
.
task
(
'make_commonjs_out'
,
[
'dist'
,
'genproto_well_known_types_commonjs'
,
'genproto_group1_commonjs'
,
'genproto_group2_commonjs'
,
'genproto_commonjs_wellknowntypes'
,
'commonjs_asserts'
,
'commonjs_testdeps'
,
'genproto_group3_commonjs_strict'
],
function
(
cb
)
{
gulp
.
task
(
'make_commonjs_out'
,
gulp
.
series
(
[
'dist'
,
'genproto_well_known_types_commonjs'
,
'genproto_group1_commonjs'
,
'genproto_group2_commonjs'
,
'genproto_commonjs_wellknowntypes'
,
'commonjs_asserts'
,
'commonjs_testdeps'
,
'genproto_group3_commonjs_strict'
],
function
(
cb
)
{
// TODO(haberman): minify this more aggressively.
// Will require proper externs/exports.
var
cmd
=
"mkdir -p commonjs_out/binary && mkdir -p commonjs_out/test_node_modules && "
;
...
...
@@ -201,35 +201,35 @@ gulp.task('make_commonjs_out', ['dist', 'genproto_well_known_types_commonjs', 'g
console
.
log
(
stderr
);
cb
(
err
);
});
});
})
)
;
gulp
.
task
(
'deps'
,
[
'genproto_well_known_types_closure'
,
'genproto_group1_closure'
,
'genproto_group2_closure'
],
function
(
cb
)
{
gulp
.
task
(
'deps'
,
gulp
.
series
(
[
'genproto_well_known_types_closure'
,
'genproto_group1_closure'
,
'genproto_group2_closure'
],
function
(
cb
)
{
exec
(
'./node_modules/google-closure-library/closure/bin/build/depswriter.py binary/arith.js binary/constants.js binary/decoder.js binary/encoder.js binary/reader.js binary/utils.js binary/writer.js debug.js map.js message.js node_loader.js test_bootstrap.js > deps.js'
,
function
(
err
,
stdout
,
stderr
)
{
console
.
log
(
stdout
);
console
.
log
(
stderr
);
cb
(
err
);
});
});
})
)
;
gulp
.
task
(
'test_closure'
,
[
'genproto_well_known_types_closure'
,
'genproto_group1_closure'
,
'genproto_group2_closure'
,
'deps'
],
function
(
cb
)
{
gulp
.
task
(
'test_closure'
,
gulp
.
series
(
[
'genproto_well_known_types_closure'
,
'genproto_group1_closure'
,
'genproto_group2_closure'
,
'deps'
],
function
(
cb
)
{
exec
(
'JASMINE_CONFIG_PATH=jasmine.json ./node_modules/.bin/jasmine'
,
function
(
err
,
stdout
,
stderr
)
{
console
.
log
(
stdout
);
console
.
log
(
stderr
);
cb
(
err
);
});
});
})
)
;
gulp
.
task
(
'test_commonjs'
,
[
'make_commonjs_out'
],
function
(
cb
)
{
gulp
.
task
(
'test_commonjs'
,
gulp
.
series
(
[
'make_commonjs_out'
],
function
(
cb
)
{
exec
(
'cd commonjs_out && JASMINE_CONFIG_PATH=jasmine.json NODE_PATH=test_node_modules ../node_modules/.bin/jasmine'
,
function
(
err
,
stdout
,
stderr
)
{
console
.
log
(
stdout
);
console
.
log
(
stderr
);
cb
(
err
);
});
});
})
)
;
gulp
.
task
(
'test'
,
[
'test_closure'
,
'test_commonjs'
],
function
(
cb
)
{
gulp
.
task
(
'test'
,
gulp
.
series
(
[
'test_closure'
,
'test_commonjs'
],
function
(
cb
)
{
cb
();
});
})
)
;
js/package.json
View file @
303191d8
...
...
@@ -11,7 +11,7 @@
"glob"
:
"~6.0.4"
,
"google-closure-compiler"
:
"~20190301.0.0"
,
"google-closure-library"
:
"~20190301.0.0"
,
"gulp"
:
"~
3.9.0
"
,
"gulp"
:
"~
4.0.1
"
,
"jasmine"
:
"~2.4.1"
},
"scripts"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment