В терминале ошибок не выдает
В видео создается папка dist - у меня нет.
Расположение файлов: скрин -
https://skrinshoter.ru/sLgUxCY8v4W?a
5 часов ищу ответ. никак
package.json
{
"name": "denis-gulp",
"version": "1.0.0",
"description": "",
"main": "gulpfile.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"gulp": "^4.0.2"
}
}
gulpfiles.js
import gulp from "gulp";
import { path } from "./gulp/config/path.js";
global.app = {
path: path,
gulp: gulp
}
import { copy } from "./gulp/tasks/copy.js";
gulp.task('default', copy);
path.js
import * as nodePath from 'path';
const rootFolder = nodePath.basename(nodePath.resolve());
const buildFolder = `./dist`;
const srcFolder = `./src`;
export const path = {
build: {
files: `$(buildFolder)/files/`,
},
src: {
files: `$(srcFolder)/files/**/*.*`,
},
watch: {},
clean: buildFolder,
buildFolder: buildFolder,
srcFolder: srcFolder,
rootFolder: rootFolder,
ftp: ``
}
copy.js
export const copy = () => {
return app.gulp.src(app.path.src.files)
.pipe(app.gulp.dest(app.path.build.files))
}