Skip to content

Commit

Permalink
Rename cache CLI option [major]
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Dec 6, 2023
1 parent b4f1fcc commit 66756f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ module.exports = (async () => {
| `--source-maps` / `-s` | Output source maps. `--source-maps inline` for inline source maps. | Disabled |
| `--no-exec` | Output a file which exports the input rather than executes it. | Exec enabled |
| `--stats` | Output stats file.<br />Provide filename or `true` for `livepack-stats.json`. | Disabled |
| `--no-babel-cache` | Disable Babel's cache | Cache enabled |
| `--no-cache` | Disable instrumentation cache | Cache enabled |

#### Config file

Expand All @@ -187,7 +187,7 @@ You can set options in a `livepack.config.json` file rather than on command line
"sourceMaps": true,
"exec": true,
"stats": false,
"babelCache": true
"cache": true
}
```

Expand Down Expand Up @@ -255,7 +255,7 @@ require('livepack/register')( {
|-|-|-|-|
| `esm` | `boolean` | Set to `true` if codebase being serialized contains ECMAScript modules (`import x from 'x'`) | `false` |
| `jsx` | `boolean` | Set to `true` if codebase being serialized contains JSX | `false` |
| `cache` | `boolean` | If `true`, Babel cache is used to speed up Livepack | `true` |
| `cache` | `boolean` | If `true`, instrumentation cache is used to speed up Livepack | `true` |

These options correspond to CLI options, but sometimes named slightly differently.

Expand Down
6 changes: 3 additions & 3 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ const {argv} = yargs
throw new Error('--stats option should have no value or string for name of stats file');
}
})
.option('babel-cache', {
description: 'Enable Babel cache',
.option('cache', {
description: 'Enable instrumentation cache',
type: 'boolean',
default: true
})
Expand Down Expand Up @@ -179,7 +179,7 @@ const register = require('./register/index.js');
register({
esm: argv.esm,
jsx: argv.jsx,
cache: argv.babelCache
cache: argv.cache
});

// Serialize
Expand Down

0 comments on commit 66756f5

Please sign in to comment.