mirror of
https://github.com/primedigitaltech/azon_seeker.git
synced 2026-01-19 13:13:22 +08:00
18 lines
517 B
TypeScript
18 lines
517 B
TypeScript
import _7z from '7zip-min';
|
|
import { basename } from 'path';
|
|
import { r, log } from './utils';
|
|
import packageJson from '../package.json';
|
|
|
|
const scriptPath = ['extension', 'extension-firefox'];
|
|
|
|
scriptPath.forEach(async (src) => {
|
|
const srcPath = r(src);
|
|
const distPath = r('build', `${basename(src)}-v${packageJson.version}.7z`);
|
|
try {
|
|
const output = await _7z.pack(srcPath, distPath);
|
|
log('Info', `stdout of the 7za command execution ${output}`);
|
|
} catch (err) {
|
|
log('Error', `${err}`);
|
|
}
|
|
});
|