Skip to content

Commit

Permalink
assign "process" to "D.process" and use that
Browse files Browse the repository at this point in the history
This is to prevent browserify from adding a shim for "process".
  • Loading branch information
ngn committed Feb 4, 2015
1 parent 014a29a commit c0978a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/init.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ do ->
# https://nodejs.org/api/process.html#process_process_platform
# https://stackoverflow.com/questions/19877924/what-is-the-list-of-possible-values-for-navigator-platform-as-of-today
# The theme can be overridden through localStorage.theme or an environment variable $DYALOG_IDE_THEME
localStorage.theme ?= process?.env?.DYALOG_IDE_THEME || do ->
p = (process ? navigator).platform
localStorage.theme ?= D.process?.env?.DYALOG_IDE_THEME || do ->
p = (D.process ? navigator).platform
if /^(darwin|mac|ipad|iphone|ipod)/i.test p then 'cupertino'
else if /^(linux|x11|android)/i.test p then 'freedom'
else 'redmond'
Expand Down
1 change: 1 addition & 0 deletions init-nw.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ if process? then do ->
gui = require 'nw.gui'; crypto = require 'crypto'; fs = require 'fs'
path = require 'path'; {spawn} = require 'child_process'; {Proxy} = require './proxy'
D.nwjs = true
D.process = process

nww = gui.Window.get()
if !opener then do -> # restore window state:
Expand Down

0 comments on commit c0978a2

Please sign in to comment.