inline-source-cli icon indicating copy to clipboard operation
inline-source-cli copied to clipboard

Piping causes error: Not enough non-option arguments: got 0, need at least 1

Open thinkloop opened this issue 9 years ago • 1 comments

When I try to run the code in the readme:

cat build/index.html | inline-source --root build > build/bundle.html

I get the error:

Not enough non-option arguments: got 0, need at least 1

The build/index.html looks like:

<html lang="en">
<head>
    <meta charset="utf-8">
    <script src="test.js" inline></script>
</head>
<body ontouchstart="">
</body>
</html>

The test.js looks like:

test

The output file build/bundle.html gets created but empty.

thinkloop avatar Nov 16 '16 01:11 thinkloop

You need to provide an unnamed argument for the entrypoint.

Something like inline-source --root build index.html.

ghost avatar Jan 23 '17 18:01 ghost