Skip to content

Commit

Permalink
fix docs for assets
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot committed Nov 25, 2024
1 parent 44bb83e commit 1b0176b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h1>Options</h1>
<tr><td>`--verbose`</td><td></td><td>Print verbose logging info.</td></tr>
<tr><td>`--write-biblio`</td><td></td><td>Emit a biblio file to the specified path.</td></tr>
<tr><td>`--assets`</td><td>`assets`</td><td>"none" for no CSS/JS/etc, "inline" for inline CSS/JS/etc, "external" for external CSS/JS/etc.</td></tr>
<tr><td>`--assets-dir`</td><td>`assetsDir`</td><td>Directory in which to place assets when using `--assets=external`.</td></tr>
<tr><td>`--assets-dir`</td><td>`assetsDir`</td><td>Directory in which to place assets when using `--assets=external`. Defaults to "assets".</td></tr>
<tr><td>`--lint-spec`</td><td>`lintSpec`</td><td>Enforce some style and correctness checks.</td></tr>
<tr><td>`--error-formatter`</td><td></td><td>The <a href="https://eslint.org/docs/user-guide/formatters/">eslint formatter</a> to be used for printing warnings and errors when using `--verbose`. Either the name of a built-in eslint formatter or the package name of an installed eslint compatible formatter.</td></tr>
<tr><td>`--strict`</td><td></td><td>Exit with an error if there are warnings. Cannot be used with `--watch`.</td></tr>
Expand Down Expand Up @@ -84,8 +84,8 @@ <h1>Options</h1>
</emu-clause>

<emu-clause id="stylesheets-and-scripts">
<h1>Stylesheets and Scripts</h1>
<p>Ecmarkup requires CSS styles and, if you're using the sidebar table of contents, javascript as well. By default CSS and JS dependencies are inlined into the document. You can override this by setting assets to "none" (for example if you want to manually link to external assets). Passing cssOut and jsOut will write the respective files to disk at the given path.</p>
<h1>Stylesheets and other assets</h1>
<p>Ecmarkup requires CSS styles and other assets. By default all assets are inlined into the document. You can override this by setting assets to "none" (for example if you want to manually link to external assets) or "external". When using "external" the default directory for assets is `assets` in the same directory as the output file, but you can override this with `--assets-dir`.</p>
</emu-clause>

<emu-clause id="editorial-conventions">
Expand Down
2 changes: 1 addition & 1 deletion src/Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export default class Spec {
this.opts.assets !== 'external' &&
this.opts.assetsDir != null
) {
throw new Error(`--assets=${this.opts.assets} cannot be used --assets-dir"`);
throw new Error(`--assets=${this.opts.assets} cannot be used with --assets-dir"`);
}

if (this.opts.multipage) {
Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ if (args.assets != null && !['none', 'inline', 'external'].includes(args.assets)
}

if (args.assets != null && args.assets !== 'external' && args['assets-dir'] != null) {
fail(`--assets=${args.assets} cannot be used --assets-dir"`);
fail(`--assets=${args.assets} cannot be used with --assets-dir"`);
}

if (args.multipage) {
Expand Down

0 comments on commit 1b0176b

Please sign in to comment.