Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Fix #241 - Remove config.json [BREAKING CHANGE] (#243)
Browse files Browse the repository at this point in the history
* BREAKING CHANGE: Remove config.json from code / docs, now only config.js is supported

* Bump version number
  • Loading branch information
extr0py authored Feb 24, 2017
1 parent d52ae33 commit e7e1435
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ Leave the cursor hovering over an identifier.

### Configuration

> ONI is configurable via a 'config.json' located in $HOME/.oni
> ONI is configurable via a 'config.js' located in $HOME/.oni
Here's an example config.json:
Here's an example config.js:
```
{
module.exports = {
"oni.useDefaultConfig": true,
"oni.loadInitVim": true,
"editor.fontSize": "14px",
Expand Down
6 changes: 1 addition & 5 deletions browser/src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,11 @@ const DefaultPlatformConfig = Platform.isWindows() ? WindowsConfig : Platform.is

Performance.mark("Config.load.start")

export const userConfigFile = path.join(getUserFolder(), "config.json")
export const userJsConfig = path.join(getUserFolder(), "config.js")

let userConfig = {}
if (fs.existsSync(userConfigFile)) {
userConfig = JSON.parse(fs.readFileSync(userConfigFile, "utf8"))
}

let userRuntimeConfig = {}

if (fs.existsSync(userJsConfig)) {
userRuntimeConfig = global["require"](userJsConfig) // tslint:disable-line no-string-literal
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oni-vim",
"version": "0.1.8",
"version": "0.1.9",
"description": "NeoVim front-end with IDE-style extensibility",
"keywords": [
"vim",
Expand Down

0 comments on commit e7e1435

Please sign in to comment.