summaryrefslogtreecommitdiffhomepage
path: root/gui/tasks/assets.js
blob: 56b0c7a8ad56b6b8d79146848c90610b7c8cfd5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const { parallel, src, dest } = require('gulp');

function copyStaticAssets() {
  return src('assets/**').pipe(dest('build/assets'));
}

function copyConfig() {
  return src('src/config.json').pipe(dest('build/src'));
}

function copyCss() {
  return src('src/renderer/**/*.css').pipe(dest('build/src/renderer'));
}

function copyHtml() {
  return src('src/renderer/index.html').pipe(dest('build/src/renderer'));
}

function copyLocales() {
  return src('locales/**/*.po').pipe(dest('build/locales'));
}

function copyGeoData() {
  return src('../dist-assets/geo/*.gl').pipe(dest('build/assets/geo'));
}

copyStaticAssets.displayName = 'copy-static-assets';
copyConfig.displayName = 'copy-config';
copyCss.displayName = 'copy-css';
copyHtml.displayName = 'copy-html';
copyLocales.displayName = 'copy-locales';
copyGeoData.displayName = 'copy-geo-data';

exports.copyAll = parallel(copyStaticAssets, copyConfig, copyCss, copyHtml, copyLocales, copyGeoData);
exports.copyStaticAssets = copyStaticAssets;
exports.copyCss = copyCss;
exports.copyHtml = copyHtml;
exports.copyConfig = copyConfig;
exports.copyGeoData = copyGeoData;