Skip to content

Commit

Permalink
upgrade some deps
Browse files Browse the repository at this point in the history
  • Loading branch information
romannurik committed Jul 2, 2024
1 parent 834b3bd commit 7dd2ca4
Show file tree
Hide file tree
Showing 4 changed files with 4,830 additions and 4,461 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v1
Expand Down
29 changes: 19 additions & 10 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,27 @@ gulp.task('service-worker', () => {


function esBuild(extraOptions) {
return esbuild.build({
return esbuild.context({
entryPoints: ['index.js'],
bundle: true,
minify: !DEV_MODE,
loader: {
".ttf": "file",
},
plugins: [sassPlugin()],
outfile: 'dist/index.js',
...extraOptions,
plugins: [
...(extraOptions?.plugins || []),
sassPlugin(),
],
outfile: 'dist/index.js',
});
}

gulp.task('esbuild', () => esBuild());
gulp.task('esbuild', async () => {
let ctx = await esBuild();
ctx.rebuild();
ctx.dispose();
});


gulp.task('copy', () => {
Expand Down Expand Up @@ -113,13 +120,15 @@ gulp.task('__serve__', gulp.series('build', () => {
let reload = cb => { browserSync.reload(); cb && cb(); };

esBuild({
watch: {
onRebuild(error, result) {
if (error) console.error('watch build failed:', error)
else reload();
plugins: [{
name: 'on-build-end',
setup(build) {
build.onEnd((result) => {
if (!result.errors.length) reload();
});
},
},
});
}]
}).then(ctx => ctx.watch());

gulp.watch(['*.{html,js}'], gulp.series('copy', reload));
}));
Expand Down
Loading

0 comments on commit 7dd2ca4

Please sign in to comment.