Merge pull request #7 from pulsar-edit/api-rebrand

Adding branding info to global API
This commit is contained in:
confused_techie 2022-07-24 18:30:57 -07:00 committed by GitHub
commit 920eb6556e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,10 @@
"productName": "Atom", "productName": "Atom",
"version": "1.63.0-dev", "version": "1.63.0-dev",
"description": "A hackable text editor for the 21st Century.", "description": "A hackable text editor for the 21st Century.",
"branding": {
"id": "pulsar",
"properName": "Pulsar"
},
"main": "./src/main-process/main.js", "main": "./src/main-process/main.js",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -46,6 +46,7 @@ const TextEditorRegistry = require('./text-editor-registry');
const AutoUpdateManager = require('./auto-update-manager'); const AutoUpdateManager = require('./auto-update-manager');
const StartupTime = require('./startup-time'); const StartupTime = require('./startup-time');
const getReleaseChannel = require('./get-release-channel'); const getReleaseChannel = require('./get-release-channel');
const packagejson = require("../package.json");
const stat = util.promisify(fs.stat); const stat = util.promisify(fs.stat);
@ -219,6 +220,11 @@ class AtomEnvironment {
commands: this.commands, commands: this.commands,
stateStore: this.stateStore stateStore: this.stateStore
}); });
this.branding = {
id: packagejson.branding.id,
properName: packagejson.branding.properName
};
// Keep instances of HistoryManager in sync // Keep instances of HistoryManager in sync
this.disposables.add( this.disposables.add(