-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Upgrade to gulp 4 #9405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to gulp 4 #9405
Conversation
gulpfile.babel.js
Outdated
| argv.rootPath || '../../../../web/assets/', | ||
| ...(argv.vendorPath ? [ | ||
| '--vendorPath', | ||
| argv.vendorPath + 'sylius/sylius/src/Sylius/Bundle/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added this to allow using a custom vendorPath from the parent gulpfile. WDYT @pamil?
| @@ -1,11 +1,16 @@ | |||
| { | |||
| "dependencies": { | |||
| "babel-runtime": "^6.26.0", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is under dependencies instead of devDependencies to prepare for the future where we will use Babel for all Sylius JS files. 😆
| .pipe(gulpif(env !== 'prod', sourcemaps.mapSources(mapSourcePath))) | ||
| .pipe(gulpif(env !== 'prod', sourcemaps.write('./'))) | ||
| .pipe(gulp.dest(adminRootPath + 'js/')) | ||
| .pipe(livereload()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the livereload() call here because it seemed to be missing. Let me know if it was intentionally omitted.
| .pipe(gulpif(env !== 'prod', sourcemaps.write('./'))) | ||
| .pipe(gulp.dest(adminRootPath + 'css/')) | ||
| .pipe(livereload()) | ||
| , |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this comma too... But I'm not sure where else to put it. 🙈
| export const build = gulp.parallel(buildAdmin, buildShop); | ||
| build.description = 'Build assets.'; | ||
|
|
||
| gulp.task('admin', buildAdmin); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should keep these aliases?
d66f1f2 to
a1da8e6
Compare
| .pipe(gulpif(env !== 'prod', sourcemaps.mapSources(mapSourcePath))) | ||
| .pipe(gulpif(env !== 'prod', sourcemaps.write('./'))) | ||
| .pipe(gulp.dest(upath.joinSafe(adminRootPath, 'js'))) | ||
| .pipe(livereload()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the livereload() call here because it seemed to be missing. Let me know if it was intentionally omitted.
| .pipe(gulpif(env !== 'prod', sourcemaps.mapSources(mapSourcePath))) | ||
| .pipe(gulpif(env !== 'prod', sourcemaps.write('./'))) | ||
| .pipe(gulp.dest(upath.joinSafe(shopRootPath, 'js'))) | ||
| .pipe(livereload()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the livereload() call here because it seemed to be missing. Let me know if it was intentionally omitted.
|
ping @pamil |
.babelrc
Outdated
| "presets": [ | ||
| ["env", { | ||
| "targets": { | ||
| "node": "4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could increment this to 6, since we don't support unmaintained Node.js versions.
a1da8e6 to
27d6c57
Compare
Use gulpfile.babel.js so that we can write in ES2015+
27d6c57 to
df840ef
Compare
| "scripts": { | ||
| "gulp": "gulp" | ||
| "build": "gulp", | ||
| "gulp": "gulp", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kept for BC.
|
Thank you, Teoh, looks awesome! 🎉 |
Upgrade to gulp 4
Use
gulpfile.babel.jsso that we can write in ES2015+ 🎉/cc @pamil