2023-01-03 19:55:46 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
2021-12-14 16:43:46 +00:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2023-01-13 00:24:59 +00:00
|
|
|
import { join } from 'path';
|
|
|
|
import { copyFileSync } from 'fs';
|
2021-12-14 16:43:46 +00:00
|
|
|
|
|
|
|
const BASE_BOWER = join(__dirname, '../../components');
|
|
|
|
|
|
|
|
// Copy
|
|
|
|
|
|
|
|
console.log();
|
|
|
|
console.log('Copying...');
|
|
|
|
|
|
|
|
const BASE_JS = join(__dirname, '../../js');
|
|
|
|
const COPY_SOURCES = [
|
|
|
|
{
|
|
|
|
src: join(BASE_BOWER, 'mp3lameencoder/lib/Mp3LameEncoder.js'),
|
|
|
|
dest: join(BASE_JS, 'Mp3LameEncoder.min.js'),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
src: join(BASE_BOWER, 'webaudiorecorder/lib/WebAudioRecorderMp3.js'),
|
|
|
|
dest: join(BASE_JS, 'WebAudioRecorderMp3.js'),
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
for (const { src, dest } of COPY_SOURCES) {
|
|
|
|
console.log(`Copying ${src} to ${dest}`);
|
|
|
|
copyFileSync(src, dest);
|
|
|
|
}
|