[15:09:09] The following tasks did not complete: build
[15:09:09] Did you forget to signal async completion?
// html build
function html_build () {
return gulp.src(path.src.html) // get all html files
.pipe(plumber()) // gulp plugins bug tracking
.pipe(rigger()) // templates import
.pipe(gulp.dest(path.build.html)) // deploy html
.pipe(browserSync.reload({ stream: true })); // browser-sync reload
}
exports.html_build = html_build;
function build () {
return gulp.series(
clean_build,
gulp.parallel(
html_build,
js_build,
css_build,
php_build,
fonts_build,
image_build
)
);
}
exports.build = build();
// default task
exports.default = gulp.series(
build(),
gulp.parallel(webserver, watch)
);
exports.build = gulp.series(build);
// всё дерево в топике писать нет смысла
path.src.js = 'assets/src/js/*.js';
// сбор js
gulp.task('js:build', function () {
return gulp.src(path.src.js) // получаем все файлы на входе
.pipe(webpackStream({
mode: "production",
output: {
filename: 'main.js',
},
module: {
rules: [
{
test: /\.(js)$/,
exclude: /(node_modules)/,
loader: 'babel-loader',
query: {
presets: ['@babel/env'],
plugins: ['babel-plugin-root-import']
}
},
]
},
optimization: {
minimizer: [
new UglifyJsPlugin({
uglifyOptions: {
output: {
comments: false,
},
},
}),
],
}
})).on('error', function handleError() {
this.emit('end')
})
.pipe(gulp.dest(path.build.js))
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest(path.build.js))
.pipe(webserver.reload({ stream: true }));
});
return src(['app/js/*.js')
// Entry point
import $ from 'jquery';
window.jQuery = window.$ = $;
console.log($('body'));
// Entry point
import $ from 'jquery';
window.jQuery = window.$ = $;
// increment some jQuery code
import './some-jquery-code';
Uncaught ReferenceError: jQuery is not defined
import WOW from 'wow.js';
new WOW().init();
...
<div class="block__element">
<div class="block__element block__element--modificator">
<div class="block__element">
<div class="block__element">
...