mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
Add shebang to output
This commit is contained in:
@@ -9,7 +9,10 @@ export default {
|
|||||||
output: {
|
output: {
|
||||||
dir: "build",
|
dir: "build",
|
||||||
format: "cjs",
|
format: "cjs",
|
||||||
assetFileNames: "[name]-[hash][extname]"
|
assetFileNames: "[name]-[hash][extname]",
|
||||||
|
// This is needed so the resulting `index.js` can be
|
||||||
|
// executed by `npx`.
|
||||||
|
banner: "#!/usr/bin/env node"
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
resolve(),
|
resolve(),
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ async function processFiles(files) {
|
|||||||
|
|
||||||
if (isMainThread) {
|
if (isMainThread) {
|
||||||
program
|
program
|
||||||
|
.name("squoosh-cli")
|
||||||
.version(version)
|
.version(version)
|
||||||
.arguments("<files...>")
|
.arguments("<files...>")
|
||||||
.option("-d, --output-dir <dir>", "Output directory", ".")
|
.option("-d, --output-dir <dir>", "Output directory", ".")
|
||||||
|
|||||||
Reference in New Issue
Block a user