diff --git a/gulpfile.js b/gulpfile.js index 1be65bf..ac16d8c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,5 @@ -const gulp = require( 'gulp' ); -const runSequence = require( 'run-sequence' ); +const gulp = require( 'gulp' ); const child = require( 'child_process' ); const path = require( 'path' ); @@ -30,57 +29,45 @@ gulp.task( 'make-build-dir', ( ) => mkdirp( buildRoot ) ); -gulp.task( 'clone-libphonenumber', [ 'make-build-dir' ], ( ) => +gulp.task( 'clone-libphonenumber', gulp.series( 'make-build-dir', ( ) => gitClone( libphonenumberUrl, 'libphonenumber', libphonenumberVersion ) -); +) ); -gulp.task( 'clone-closure-library', [ 'make-build-dir' ], ( ) => +gulp.task( 'clone-closure-library', gulp.series( 'make-build-dir', ( ) => gitClone( closureLibraryUrl, 'closure-library', 'v20171112' ) -); +) ); -gulp.task( 'checkout-closure-linter', [ 'make-build-dir' ], ( ) => +gulp.task( 'checkout-closure-linter', gulp.series( 'make-build-dir', ( ) => gitClone( closureLinterUrl, 'closure-linter' ) -); +) ); -gulp.task( 'checkout-python-gflags', [ 'make-build-dir' ], ( ) => +gulp.task( 'checkout-python-gflags', gulp.series( 'make-build-dir', ( ) => gitClone( pythonGflagsUrl, 'python-gflags' ) -); +) ); -gulp.task( 'download-deps', [ +gulp.task( 'download-deps', gulp.parallel( 'clone-libphonenumber', 'clone-closure-library', 'checkout-closure-linter', 'checkout-python-gflags' -] ); +) ); -gulp.task( 'build-deps', [ 'download-deps' ] ); +gulp.task( 'build-deps', gulp.series( 'download-deps' ) ); gulp.task( 'build-libphonenumber', ( ) => { var args = [ '-f', 'build.xml', 'compile-exports' ]; return runCommand( 'ant', args, { cwd: '.' } ); } ); -gulp.task( 'build', cb => - runSequence( - 'build-deps', - 'build-libphonenumber', - cb - ) -); +gulp.task( 'build', gulp.series( 'build-deps', 'build-libphonenumber' ) ); gulp.task( 'update-readme', ( ) => updateReadme( ) ); -gulp.task( 'default', [ 'clean' ], cb => - runSequence( - 'build', - 'update-readme', - cb - ) -); +gulp.task( 'default', gulp.series( 'clean', 'build', 'update-readme' ) ); -function updateReadme( ) +async function updateReadme( ) { replace( { regex: 'Uses libphonenumber ([A-Za-z.0-9]+)', diff --git a/package.json b/package.json index a8631a2..b90944a 100644 --- a/package.json +++ b/package.json @@ -37,17 +37,16 @@ "devDependencies": { "@types/mocha": "5.x", "chai": "4.x", - "cz-conventional-changelog": "^2.1.0", + "cz-conventional-changelog": "2.x", "google-closure-compiler": "20171023.0.1", - "gulp": "3.x", + "gulp": "4.x", "mkdirp": "0.x", "mocha": "5.x", "pre-commit": "1.x", "replace": "1.x", "rimraf-promise": "2.x", - "run-sequence": "2.x", - "semantic-release": "^15.12.4", - "typescript": "2.8.x" + "semantic-release": "15.x", + "typescript": "3.x" }, "config": { "commitizen": {