mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
11 lines
260 B
JavaScript
11 lines
260 B
JavaScript
import { minify } from '../../index.js';
|
|
import { promises as fs } from 'fs';
|
|
|
|
const files = process.argv.slice(2);
|
|
const inputCode = await fs.readFile(files[0], 'utf8');
|
|
|
|
await minify(inputCode, {
|
|
compress: true,
|
|
mangle: true,
|
|
sourceMap: false,
|
|
}) |