Use - as filename seperator for coffee script files. Fixes #15.
Also clean unused files and wrong file names.
This commit is contained in:
parent
9ea1f9956e
commit
bb69d99423
15 changed files with 28 additions and 39 deletions
15
atom.gyp
15
atom.gyp
|
@ -10,20 +10,19 @@
|
||||||
],
|
],
|
||||||
'coffee_sources': [
|
'coffee_sources': [
|
||||||
'browser/api/lib/app.coffee',
|
'browser/api/lib/app.coffee',
|
||||||
'browser/api/lib/atom_delegate.coffee',
|
'browser/api/lib/atom-delegate.coffee',
|
||||||
'browser/api/lib/browser_window.coffee',
|
'browser/api/lib/browser-window.coffee',
|
||||||
'browser/api/lib/dialog.coffee',
|
'browser/api/lib/dialog.coffee',
|
||||||
'browser/api/lib/ipc.coffee',
|
'browser/api/lib/ipc.coffee',
|
||||||
'browser/api/lib/menu.coffee',
|
'browser/api/lib/menu.coffee',
|
||||||
'browser/api/lib/menu_item.coffee',
|
'browser/api/lib/menu-item.coffee',
|
||||||
'browser/atom/atom.coffee',
|
'browser/atom/atom.coffee',
|
||||||
'browser/atom/objects_registry.coffee',
|
'browser/atom/objects-registry.coffee',
|
||||||
'browser/atom/rpc_server.coffee',
|
'browser/atom/rpc-server.coffee',
|
||||||
'common/api/lib/callbacks_registry.coffee',
|
'common/api/lib/callbacks-registry.coffee',
|
||||||
'common/api/lib/clipboard.coffee',
|
'common/api/lib/clipboard.coffee',
|
||||||
'common/api/lib/id_weak_map.coffee',
|
'common/api/lib/id-weak-map.coffee',
|
||||||
'common/api/lib/shell.coffee',
|
'common/api/lib/shell.coffee',
|
||||||
'renderer/api/lib/dialog.coffee',
|
|
||||||
'renderer/api/lib/ipc.coffee',
|
'renderer/api/lib/ipc.coffee',
|
||||||
'renderer/api/lib/remote.coffee',
|
'renderer/api/lib/remote.coffee',
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
EventEmitter = require('events').EventEmitter
|
EventEmitter = require('events').EventEmitter
|
||||||
v8Util = process.atomBinding 'v8_util'
|
v8Util = process.atomBinding 'v8_util'
|
||||||
objectsRegistry = require '../../atom/objects_registry.js'
|
objectsRegistry = require '../../atom/objects-registry.js'
|
||||||
|
|
||||||
BrowserWindow = process.atomBinding('window').BrowserWindow
|
BrowserWindow = process.atomBinding('window').BrowserWindow
|
||||||
BrowserWindow::__proto__ = EventEmitter.prototype
|
BrowserWindow::__proto__ = EventEmitter.prototype
|
|
@ -1,5 +1,5 @@
|
||||||
binding = process.atomBinding 'dialog'
|
binding = process.atomBinding 'dialog'
|
||||||
BrowserWindow = require 'browser_window'
|
BrowserWindow = require 'browser-window'
|
||||||
|
|
||||||
fileDialogProperties =
|
fileDialogProperties =
|
||||||
openFile: 1, openDirectory: 2, multiSelections: 4, createDirectory: 8
|
openFile: 1, openDirectory: 2, multiSelections: 4, createDirectory: 8
|
||||||
|
|
|
@ -2,7 +2,7 @@ EventEmitter = require('events').EventEmitter
|
||||||
send = process.atomBinding('ipc').send
|
send = process.atomBinding('ipc').send
|
||||||
|
|
||||||
sendWrap = (channel, processId, routingId, args...) ->
|
sendWrap = (channel, processId, routingId, args...) ->
|
||||||
BrowserWindow = require 'browser_window'
|
BrowserWindow = require 'browser-window'
|
||||||
if processId?.constructor is BrowserWindow
|
if processId?.constructor is BrowserWindow
|
||||||
window = processId
|
window = processId
|
||||||
processId = window.getProcessId()
|
processId = window.getProcessId()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
EventEmitter = require('events').EventEmitter
|
EventEmitter = require('events').EventEmitter
|
||||||
BrowserWindow = require 'browser_window'
|
BrowserWindow = require 'browser-window'
|
||||||
MenuItem = require 'menu_item'
|
MenuItem = require 'menu-item'
|
||||||
|
|
||||||
bindings = process.atomBinding 'menu'
|
bindings = process.atomBinding 'menu'
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ process.on 'uncaughtException', (error) ->
|
||||||
console.error message
|
console.error message
|
||||||
|
|
||||||
# Load the RPC server.
|
# Load the RPC server.
|
||||||
require './rpc_server.js'
|
require './rpc-server.js'
|
||||||
|
|
||||||
# Now we try to load app's package.json.
|
# Now we try to load app's package.json.
|
||||||
packageJson = null
|
packageJson = null
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
BrowserWindow = require 'browser_window'
|
BrowserWindow = require 'browser-window'
|
||||||
IDWeakMap = require 'id_weak_map'
|
IDWeakMap = require 'id-weak-map'
|
||||||
|
|
||||||
class ObjectsStore
|
class ObjectsStore
|
||||||
@stores = {}
|
@stores = {}
|
|
@ -1,7 +1,7 @@
|
||||||
ipc = require 'ipc'
|
ipc = require 'ipc'
|
||||||
path = require 'path'
|
path = require 'path'
|
||||||
objectsRegistry = require './objects_registry.js'
|
objectsRegistry = require './objects-registry.js'
|
||||||
v8_util = process.atomBinding 'v8_util'
|
v8Util = process.atomBinding 'v8_util'
|
||||||
|
|
||||||
# Convert a real value into meta data.
|
# Convert a real value into meta data.
|
||||||
valueToMeta = (processId, routingId, value) ->
|
valueToMeta = (processId, routingId, value) ->
|
||||||
|
@ -46,7 +46,7 @@ unwrapArgs = (processId, routingId, args) ->
|
||||||
when 'function'
|
when 'function'
|
||||||
ret = ->
|
ret = ->
|
||||||
ipc.sendChannel processId, routingId, 'ATOM_RENDERER_CALLBACK', meta.id, valueToMeta(processId, routingId, arguments)
|
ipc.sendChannel processId, routingId, 'ATOM_RENDERER_CALLBACK', meta.id, valueToMeta(processId, routingId, arguments)
|
||||||
v8_util.setDestructor ret, ->
|
v8Util.setDestructor ret, ->
|
||||||
ipc.sendChannel processId, routingId, 'ATOM_RENDERER_RELEASE_CALLBACK', meta.id
|
ipc.sendChannel processId, routingId, 'ATOM_RENDERER_RELEASE_CALLBACK', meta.id
|
||||||
ret
|
ret
|
||||||
else throw new TypeError("Unknown type: #{meta.type}")
|
else throw new TypeError("Unknown type: #{meta.type}")
|
||||||
|
@ -68,7 +68,7 @@ ipc.on 'ATOM_BROWSER_RELEASE_RENDER_VIEW', (event, processId, routingId) ->
|
||||||
|
|
||||||
ipc.on 'ATOM_BROWSER_CURRENT_WINDOW', (event, processId, routingId) ->
|
ipc.on 'ATOM_BROWSER_CURRENT_WINDOW', (event, processId, routingId) ->
|
||||||
try
|
try
|
||||||
BrowserWindow = require 'browser_window'
|
BrowserWindow = require 'browser-window'
|
||||||
window = BrowserWindow.fromProcessIdAndRoutingId processId, routingId
|
window = BrowserWindow.fromProcessIdAndRoutingId processId, routingId
|
||||||
event.result = valueToMeta processId, routingId, window
|
event.result = valueToMeta processId, routingId, window
|
||||||
catch e
|
catch e
|
|
@ -1,9 +1,9 @@
|
||||||
var app = require('app');
|
var app = require('app');
|
||||||
var delegate = require('atom_delegate');
|
var delegate = require('atom-delegate');
|
||||||
var ipc = require('ipc');
|
var ipc = require('ipc');
|
||||||
var Menu = require('menu');
|
var Menu = require('menu');
|
||||||
var MenuItem = require('menu_item');
|
var MenuItem = require('menu-item');
|
||||||
var BrowserWindow = require('browser_window');
|
var BrowserWindow = require('browser-window');
|
||||||
|
|
||||||
var mainWindow = null;
|
var mainWindow = null;
|
||||||
var menu = null;
|
var menu = null;
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
remote = require 'remote'
|
|
||||||
dialog = remote.require 'dialog'
|
|
||||||
|
|
||||||
win = remote.getCurrentWindow()
|
|
||||||
|
|
||||||
module.exports =
|
|
||||||
openFolder: (args...) -> dialog.openFolder win, args...
|
|
||||||
saveAs: (args...) -> dialog.saveAs win, args...
|
|
||||||
openFile: (args...) -> dialog.openFile win, args...
|
|
||||||
openMultiFiles: (args...) -> dialog.openMultiFiles win, args...
|
|
|
@ -1,6 +1,6 @@
|
||||||
ipc = require 'ipc'
|
ipc = require 'ipc'
|
||||||
CallbacksRegistry = require 'callbacks_registry'
|
CallbacksRegistry = require 'callbacks-registry'
|
||||||
v8_util = process.atomBinding 'v8_util'
|
v8Util = process.atomBinding 'v8_util'
|
||||||
|
|
||||||
currentContextExist = true
|
currentContextExist = true
|
||||||
callbacksRegistry = new CallbacksRegistry
|
callbacksRegistry = new CallbacksRegistry
|
||||||
|
@ -8,7 +8,7 @@ callbacksRegistry = new CallbacksRegistry
|
||||||
# Convert the arguments object into an array of meta data.
|
# Convert the arguments object into an array of meta data.
|
||||||
wrapArgs = (args) ->
|
wrapArgs = (args) ->
|
||||||
Array::slice.call(args).map (value) ->
|
Array::slice.call(args).map (value) ->
|
||||||
if typeof value is 'object' and v8_util.getHiddenValue value, 'isRemoteObject'
|
if typeof value is 'object' and v8Util.getHiddenValue value, 'isRemoteObject'
|
||||||
type: 'object', id: value.id
|
type: 'object', id: value.id
|
||||||
else if typeof value is 'function'
|
else if typeof value is 'function'
|
||||||
type: 'function', id: callbacksRegistry.add(value)
|
type: 'function', id: callbacksRegistry.add(value)
|
||||||
|
@ -42,7 +42,7 @@ metaToValue = (meta) ->
|
||||||
ret = ipc.sendChannelSync 'ATOM_BROWSER_FUNCTION_CALL', meta.id, wrapArgs(arguments)
|
ret = ipc.sendChannelSync 'ATOM_BROWSER_FUNCTION_CALL', meta.id, wrapArgs(arguments)
|
||||||
return metaToValue ret
|
return metaToValue ret
|
||||||
else
|
else
|
||||||
ret = v8_util.createObjectWithName meta.name
|
ret = v8Util.createObjectWithName meta.name
|
||||||
|
|
||||||
# Polulate delegate members.
|
# Polulate delegate members.
|
||||||
for member in meta.members
|
for member in meta.members
|
||||||
|
@ -64,12 +64,12 @@ metaToValue = (meta) ->
|
||||||
|
|
||||||
# Track delegate object's life time, and tell the browser to clean up
|
# Track delegate object's life time, and tell the browser to clean up
|
||||||
# when the object is GCed.
|
# when the object is GCed.
|
||||||
v8_util.setDestructor ret, ->
|
v8Util.setDestructor ret, ->
|
||||||
return unless currentContextExist
|
return unless currentContextExist
|
||||||
ipc.sendChannel 'ATOM_BROWSER_DEREFERENCE', meta.storeId
|
ipc.sendChannel 'ATOM_BROWSER_DEREFERENCE', meta.storeId
|
||||||
|
|
||||||
# Mark this is a remote object.
|
# Mark this is a remote object.
|
||||||
v8_util.setHiddenValue ret, 'isRemoteObject', true
|
v8Util.setHiddenValue ret, 'isRemoteObject', true
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue