pulsar/exports/atom.js

44 lines
1.1 KiB
JavaScript
Raw Normal View History

2016-08-07 03:20:46 +03:00
/** @babel */
import TextBuffer, {Point, Range} from 'text-buffer'
import {File, Directory} from 'pathwatcher'
import {Emitter, Disposable, CompositeDisposable} from 'event-kit'
import BufferedNodeProcess from '../src/buffered-node-process'
import BufferedProcess from '../src/buffered-process'
import GitRepository from '../src/git-repository'
import Notification from '../src/notification'
const atomExport = {
BufferedNodeProcess,
BufferedProcess,
GitRepository,
Notification,
TextBuffer,
Point,
Range,
File,
Directory,
Emitter,
Disposable,
CompositeDisposable
}
// Shell integration is required by both Squirrel and Settings-View
if (process.platform === 'win32') {
Object.defineProperty(atomExport, 'WinShell', {
enumerable: true,
get () {
return require('../src/main-process/win-shell')
}
})
2016-08-07 03:20:46 +03:00
}
// The following classes can't be used from a Task handler and should therefore
// only be exported when not running as a child node process
if (process.type === 'renderer') {
2016-08-07 03:20:46 +03:00
atomExport.Task = require('../src/task')
atomExport.TextEditor = require('../src/text-editor')
2016-08-07 03:20:46 +03:00
}
export default atomExport