Answer the question
In order to leave comments, you need to log in
Gulp and copying dependencies in production?
Hello. Could you tell me how to correctly transfer the libraries used in the project 'node_modules\jquery\dist\jquery.slim.js' and 'node_modules\moment\min\moment-with-locales.min.js' By
creating such a task:
'use strict';
import {src, dest, watch, parallel, series} from 'gulp';
import del from 'del';
////////////////////////////////////////
const dirs = {
src: 'src',
lib: 'node_modules',
dest: 'app'
};
const paths = {
js: {
src: `${dirs.src}/js/**/*.js`,
dest: `${dirs.dest}/scripts/`
}
};
////////////////////////////////////////
// Clean
export const clean = () => del([dirs.dest]);
export const bLib = () =>
src([`${dirs.lib}/jquery/dist/jquery.slim.js`,
`${dirs.lib}/moment/min/moment-with-locales.min.js`])
.pipe(dest(`${paths.js.dest}lib/`));
// Development Task
export const dev = series(clean, bLib);
export default dev;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question