mirror of
https://github.com/swc-project/swc.git
synced 2024-11-30 15:23:33 +03:00
f960d52364
**Description:** This is for consistency and future extensions.
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,
|
|
}) |