-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sergej Popov [Contractor]
committed
Feb 10, 2019
1 parent
7065926
commit 65989f9
Showing
9 changed files
with
188 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,5 @@ build/ | |
dist/ | ||
uploads/ | ||
node_modules/ | ||
|
||
secrets.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as fs from "fs-extra"; | ||
|
||
export interface IConfig { | ||
googleApi: { | ||
refreshToken: string; | ||
clientSecret: string; | ||
clientId: string; | ||
spotifyAppIs: string; | ||
amazonMusicAppId: string; | ||
}, | ||
github: { | ||
token: string; | ||
} | ||
} | ||
|
||
|
||
export const getConfig = async () => { | ||
const json = await fs.readFile("./secrets.json", "utf-8"); | ||
return JSON.parse(json) as IConfig; | ||
}; | ||
|
||
export const getVersion = async (): Promise<string> => { | ||
const json = await fs.readFile("src/spotify/manifest.json", "utf-8"); | ||
const manifest = JSON.parse(json); | ||
return manifest.version; | ||
}; |
Oops, something went wrong.