mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-21 07:58:04 +03:00
Appending pulsar.api service
This commit is contained in:
parent
58cd60ce04
commit
d63caa54ce
@ -32,7 +32,7 @@ module.exports = function({ blobStore }) {
|
||||
const { ipcRenderer } = require('electron');
|
||||
const { resourcePath, devMode } = getWindowLoadSettings();
|
||||
require('./electron-shims');
|
||||
addAtomExport();
|
||||
addAtomExport(global.atom);
|
||||
|
||||
// Make React faster
|
||||
if (!devMode && process.env.NODE_ENV == null) {
|
||||
|
@ -9,8 +9,6 @@ module.exports = async function({ blobStore, globalAtom }) {
|
||||
const { remote } = require('electron');
|
||||
const getWindowLoadSettings = require('./get-window-load-settings');
|
||||
|
||||
console.log("WATTT????")
|
||||
|
||||
const exitWithStatusCode = function(status) {
|
||||
remote.app.emit('will-quit');
|
||||
remote.process.exit(status);
|
||||
@ -84,9 +82,6 @@ module.exports = async function({ blobStore, globalAtom }) {
|
||||
|
||||
window.addEventListener('keydown', handleKeydown, { capture: true });
|
||||
|
||||
addAtomExport();
|
||||
updateProcessEnv(env);
|
||||
|
||||
// Set up optional transpilation for packages under test if any
|
||||
const FindParentDir = require('find-parent-dir');
|
||||
const packageRoot = FindParentDir.sync(testPaths[0], 'package.json');
|
||||
@ -134,6 +129,11 @@ module.exports = async function({ blobStore, globalAtom }) {
|
||||
applicationDelegate, window, document,
|
||||
configDirPath: process.env.ATOM_HOME
|
||||
})
|
||||
addAtomExport(window.atom);
|
||||
updateProcessEnv(env);
|
||||
atom.packages.serviceHub.provide('pulsar.api', '0.1.0', {
|
||||
moduleName: '@pulsar/test', exports: require('./mocha-test-runner/helpers')
|
||||
})
|
||||
|
||||
// Set load paths for the package's test runner
|
||||
let loadPaths = vm.runInThisContext('module.paths')
|
||||
|
@ -87,9 +87,7 @@ module.exports = async function({ blobStore }) {
|
||||
|
||||
window.addEventListener('keydown', handleKeydown, { capture: true });
|
||||
|
||||
// Add 'exports' to module search path.
|
||||
addAtomExport();
|
||||
|
||||
addAtomExport(atom);
|
||||
updateProcessEnv(env);
|
||||
|
||||
// Set up optional transpilation for packages under test if any
|
||||
|
Loading…
Reference in New Issue
Block a user