2018-08-29 21:30:40 +02:00
|
|
|
import * as fs from 'fs';
|
|
|
|
import * as path from 'path';
|
|
|
|
import * as gulp from 'gulp';
|
|
|
|
|
2019-01-31 21:35:51 +01:00
|
|
|
import {PATHS} from '../../src/consts/paths';
|
|
|
|
import {ensureDir} from '../../src/helpers/fs';
|
2018-08-29 21:30:40 +02:00
|
|
|
|
|
|
|
export default gulp.task('build:copy-ui', callback => {
|
|
|
|
try {
|
|
|
|
ensureDir(path.resolve(PATHS.UI));
|
|
|
|
fs.copyFileSync(
|
2019-01-31 21:35:51 +01:00
|
|
|
path.join(PATHS.SRC, 'webviews', 'ui', 'release-notes', 'release-notes.html'),
|
2018-08-29 21:30:40 +02:00
|
|
|
path.join(PATHS.UI, 'release-notes.html')
|
|
|
|
);
|
|
|
|
fs.copyFileSync(
|
2019-01-31 21:35:51 +01:00
|
|
|
path.join(PATHS.SRC, 'webviews', 'ui', 'release-notes', 'style.css'),
|
2018-08-29 21:30:40 +02:00
|
|
|
path.join(PATHS.UI, 'release-notes.css')
|
|
|
|
);
|
|
|
|
} catch (error) {
|
|
|
|
return callback(error);
|
|
|
|
}
|
|
|
|
|
|
|
|
callback();
|
|
|
|
});
|