forked from AdguardTeam/AdguardBrowserExtension
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopy-common.js
More file actions
23 lines (20 loc) · 712 Bytes
/
copy-common.js
File metadata and controls
23 lines (20 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import path from 'path';
import gulp from 'gulp';
import {LOCALES_DIR} from './consts';
const paths = {
pages: path.join('Extension/pages/**/*'),
lib: path.join('Extension/lib/**/*'),
locales: path.join(LOCALES_DIR, '**/*')
};
/**
* Copy common files into `pathDest` directory.
* `base` param is for saving copying folders structure
*
* @param pathDest destination folder
* @param {Boolean} exceptLanguages do not copy languages if true
* @return stream
*/
const copyCommonFiles = (pathDest, exceptLanguages) =>
gulp.src([paths.lib, paths.pages, ...(exceptLanguages ? [] : [paths.locales])], {base: 'Extension'})
.pipe(gulp.dest(pathDest));
export default copyCommonFiles;