Skip to content

Commit

Permalink
Update README.md CommonJS config files
Browse files Browse the repository at this point in the history
  • Loading branch information
JumpLink committed Feb 3, 2022
1 parent 52a07c4 commit 93fcf1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- Refactor Ava test

# v2.0.0
- Fix config file loading, see #48
- The browser example now uses ESM for Gjs and Node.js
- Upgrade all dependencies to latest
- [node-gtk] don't add $obj parameter in connect() method either, thanks to @peat-psuwit
Expand Down Expand Up @@ -37,7 +38,7 @@

## Breaking Changes
- Node.js minimum version is now 16 for ESM support
- The config files must now also be in ESM format, if they are not in json format:
- The config files must also be in ESM format if you are inside a ESM Package, this is the case if `"type": "module"` is defined in your package.json. Alternatively, the file can be saved in json format, then it works in both cases.


See PR [#44](https://github.com/sammydre/ts-for-gjs/pull/44)
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ In addition to the option of passing options as a CLI flag, you can also write t
To do that, create a new config file called `.ts-for-girrc.js` in your project root directory, like this:
```js
// or on CommonJs: exports.default = {
export default {
pretty: false,
print: false,
Expand All @@ -170,6 +171,8 @@ export default {
}
```
The javascript config files must also be in ESM format if you are inside a ESM Package, this is the case if `"type": "module"` is defined in your package.json. Alternatively, the file can be saved in json format, then it works in both cases.
### About the `--moduleType esm` option
Gjs now supports ES modules, which can be activated with its `gjs -m` flag. Using this in conjunction with `"module": "es6"` in tsconfig.json is generally more
Expand Down

0 comments on commit 93fcf1e

Please sign in to comment.