Skip to content

Commit

Permalink
Using ES by default
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Apr 25, 2024
1 parent 2f0ba6d commit 18b1f10
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
25 changes: 13 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/* eslint-env node */

const gulp = require('gulp');

const cleanCSS = require('gulp-clean-css');
const inject = require('gulp-inject-string');
const merge = require('merge-stream');
const named = require('vinyl-named');
const rename = require('gulp-rename');
const replace = require('gulp-replace');
const shell = require('gulp-shell');
const webpack = require('webpack-stream');
import gulp from 'gulp';
import cleanCSS from 'gulp-clean-css';
import inject from 'gulp-inject-string';
import rename from 'gulp-rename';
import replace from 'gulp-replace';
import shell from 'gulp-shell';
import merge from 'merge-stream';
import named from 'vinyl-named';
import webpack from 'webpack-stream';

import webpackConfig from './webpack.config.js';

gulp.task('build:css:admin', () =>
gulp
Expand Down Expand Up @@ -121,7 +122,7 @@ gulp.task('build:js:admin', () =>
gulp
.src(['src/ts/admin/root_selection.ts', 'src/ts/admin/tinymce.ts'])
.pipe(named((file) => file.stem + '.min'))
.pipe(webpack(require('./webpack.config.js')))
.pipe(webpack(webpackConfig))
.pipe(inject.prepend('jQuery( function( $ ) {\n'))
.pipe(inject.append('} );\n'))
.pipe(gulp.dest('dist/admin/js/'))
Expand All @@ -131,7 +132,7 @@ gulp.task('build:js:frontend', () =>
gulp
.src(['src/ts/frontend/block.ts', 'src/ts/frontend/shortcode.ts'])
.pipe(named((file) => file.stem + '.min'))
.pipe(webpack(require('./webpack.config.js')))
.pipe(webpack(webpackConfig))
.pipe(inject.prepend('jQuery( function( $ ) {\n'))
.pipe(inject.append('} );\n'))
.pipe(gulp.dest('dist/frontend/js/'))
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"type": "git",
"url": "git+https://github.com/skaut/skaut-google-drive-gallery.git"
},
"type": "module",
"scripts": {
"clean": "rimraf dist/*",
"prebuild": "npm run clean",
Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-env node */

const TerserPlugin = require('terser-webpack-plugin');
import TerserPlugin from 'terser-webpack-plugin';

module.exports = {
export default {
mode: 'production',
module: {
rules: [
Expand Down

0 comments on commit 18b1f10

Please sign in to comment.