в функциях. php У меня есть следующий код
function university_files()
{
wp_enqueue_script('main-university-js', get_theme_file_uri('/js/scripts-bundled.js'), array('jquery'), '1.0', true);
}
add_action('wp_enqueue_scripts', 'university_files');
**and in scripts.js i have code like this**
// 3rd party packages from NPM
import $ from 'jquery';
import slick from 'slick-carousel';
// Our modules / classes
import Search from './modules/Search';
import MyNotes from './modules/MyNotes';
// Instantiate a new object using our modules/classes
var search = new Search();
var mynotes = new MyNotes();
alert("this is a js script");
**but whenever i try to reload page alert msg wont come**
**i have installed package json and the following is the gulpfile.js**
var gulp = require('gulp');
// Watch for file updates
gulp.task('watch', function () {
gulp.watch('js/**/*.js').on('change', function (file) {
//console.log(file);
console.log(('JS changed' + ' (' + file.path + ')'));
});
});
структура файла и бегущее изображение gulp watch
![enter image description here](https://i.stack.imgur.com/XZc4W.png)
но когда я пытаюсь запустить gulp watch, он работает должным образом, но после refre sh на главной странице wordpress я не получу сообщение о предупреждении, которое было написано в сценариях. js файл (находится в папке js вместе с прилагаемыми скриптами. js)
![enter image description here](https://i.stack.imgur.com/XBqpO.png)