Add <%br= %> jqhtml syntax docs, class override detection, npm update
Document event handler placement and model fetch clarification 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
34
node_modules/lilconfig/readme.md
generated
vendored
34
node_modules/lilconfig/readme.md
generated
vendored
@@ -42,16 +42,18 @@ lilconfigSync(
|
||||
*/
|
||||
```
|
||||
|
||||
## ESM
|
||||
|
||||
ESM configs can be loaded with **async API only**. Specifically `js` files in projects with `"type": "module"` in `package.json` or `mjs` files.
|
||||
|
||||
## Difference to `cosmiconfig`
|
||||
Lilconfig does not intend to be 100% compatible with `cosmiconfig` but tries to mimic it where possible. The key differences are:
|
||||
- **no** support for yaml files out of the box(`lilconfig` attempts to parse files with no extension as JSON instead of YAML). You can still add the support for YAML files by providing a loader, see an [example](#yaml-loader) below.
|
||||
- **no** cache
|
||||
Lilconfig does not intend to be 100% compatible with `cosmiconfig` but tries to mimic it where possible. The key difference is **no** support for yaml files out of the box(`lilconfig` attempts to parse files with no extension as JSON instead of YAML). You can still add the support for YAML files by providing a loader, see an [example](#yaml-loader) below.
|
||||
|
||||
### Options difference between the two.
|
||||
|
||||
|cosmiconfig option | lilconfig |
|
||||
|------------------------|-----------|
|
||||
|cache | ❌ |
|
||||
|cache | ✅ |
|
||||
|loaders | ✅ |
|
||||
|ignoreEmptySearchPlaces | ✅ |
|
||||
|packageProp | ✅ |
|
||||
@@ -89,30 +91,8 @@ lilconfig('myapp', options)
|
||||
});
|
||||
```
|
||||
|
||||
### ESM loader
|
||||
|
||||
Lilconfig v2 does not support ESM modules out of the box. However, you can support it with a custom a loader. Note that this will only work with the async `lilconfig` function and won't work with the sync `lilconfigSync`.
|
||||
|
||||
```js
|
||||
import {lilconfig} from 'lilconfig';
|
||||
|
||||
const loadEsm = filepath => import(filepath);
|
||||
|
||||
lilconfig('myapp', {
|
||||
loaders: {
|
||||
'.js': loadEsm,
|
||||
'.mjs': loadEsm,
|
||||
}
|
||||
})
|
||||
.search()
|
||||
.then(result => {
|
||||
result // {config, filepath}
|
||||
|
||||
result.config.default // if config uses `export default`
|
||||
});
|
||||
```
|
||||
|
||||
## Version correlation
|
||||
|
||||
- lilconig v1 → cosmiconfig v6
|
||||
- lilconig v2 → cosmiconfig v7
|
||||
- lilconig v3 → cosmiconfig v8
|
||||
|
||||
Reference in New Issue
Block a user