B
B
Bogdan2017-06-04 16:52:38
Slider
Bogdan, 2017-06-04 16:52:38

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;

Or is there a better solution? Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
Froggyweb, 2018-09-27
@Froggyweb

Open code and see layerslider

A
Andrey, 2018-09-28
@svistiboshka

revolution slider dig

I
Ivan, 2017-06-04
@Za0r

In production? Isn't it better to collect it in one js file?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question