Download wp-calypso/desktop/app/lib/config/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/desktop/app/lib/config/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/desktop/app/lib/config/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/desktop/app/lib/config/index.js
1.1 kB
| const config = require( '../../../config/config.json' ); | |
| const pkg = require( '../../../package.json' ); | |
| // Merge in some details from package.json | |
| config.name = pkg.productName; | |
| config.description = 'WordPress Desktop'; | |
| config.version = pkg.version; | |
| config.author = pkg.author; | |
| config.protocol = 'wpdesktop'; | |
| config.oauthLoginEnabled = process.platform !== 'linux'; | |
| config.loginURL = function () { | |
| const loginUri = ! config.oauthLoginEnabled ? 'log-in' : 'log-in/desktop'; | |
| return this.baseURL() + loginUri; | |
| }; | |
| config.baseURL = function () { | |
| if ( process.env.WP_DESKTOP_BASE_URL !== undefined ) { | |
| return `${ process.env.WP_DESKTOP_BASE_URL }/`; | |
| } | |
| return 'https://wordpress.com/'; | |
| }; | |
| config.isRelease = function () { | |
| return this.build === 'release'; | |
| }; | |
| config.isUpdater = function () { | |
| return this.build === 'updater'; | |
| }; | |
| config.isBeta = function () { | |
| return this.build === 'beta'; | |
| }; | |
| // Do not send function and DOM objects (exception in Electron v9). | |
| config.toRenderer = function () { | |
| return { | |
| build: this.build, | |
| version: this.version, | |
| }; | |
| }; | |
| module.exports = config; | |