mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
The browser process loads files from the resource path in dev mode
main.coffee is the only exception
This commit is contained in:
parent
9306c9b262
commit
0d74753d3e
@ -1,5 +1,5 @@
|
||||
AtomWindow = require './atom-window'
|
||||
ApplicationMenu = require './application-menu'
|
||||
AtomWindow = require 'atom-window'
|
||||
ApplicationMenu = require 'application-menu'
|
||||
BrowserWindow = require 'browser-window'
|
||||
Menu = require 'menu'
|
||||
autoUpdater = require 'auto-updater'
|
||||
|
@ -1,4 +1,3 @@
|
||||
AtomApplication = require './atom-application'
|
||||
autoUpdater = require 'auto-updater'
|
||||
crashReporter = require 'crash-reporter'
|
||||
delegate = require 'atom-delegate'
|
||||
@ -13,8 +12,6 @@ _ = require 'underscore'
|
||||
console.log = (args...) ->
|
||||
nslog(args.map((arg) -> JSON.stringify(arg)).join(" "))
|
||||
|
||||
require 'coffee-script'
|
||||
|
||||
delegate.browserMainParts.preMainMessageLoopRun = ->
|
||||
args = parseCommandLine()
|
||||
|
||||
@ -45,6 +42,14 @@ delegate.browserMainParts.preMainMessageLoopRun = ->
|
||||
args.pathsToOpen = args.pathsToOpen.map (pathToOpen) ->
|
||||
path.resolve(args.executedFrom ? process.cwd(), pathToOpen)
|
||||
|
||||
if args.devMode
|
||||
require('coffee-script')
|
||||
require('coffee-cache').setCacheDir('/tmp/atom-coffee-cache')
|
||||
require('module').globalPaths.push(args.resourcePath + "/src")
|
||||
AtomApplication = require 'atom-application'
|
||||
else
|
||||
AtomApplication = require './atom-application'
|
||||
|
||||
AtomApplication.open(args)
|
||||
|
||||
global.devResourcePath = path.join(app.getHomeDir(), 'github', 'atom')
|
||||
|
Loading…
Reference in New Issue
Block a user