mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
Add application:run-benchmarks command
This commit is contained in:
parent
c5b56d4070
commit
249044e754
@ -2,4 +2,5 @@ require 'atom'
|
||||
{runSpecSuite} = require 'jasmine-helper'
|
||||
|
||||
document.title = "Benchmark Suite"
|
||||
runSpecSuite("benchmark-suite", true)
|
||||
benchmarkSuite = require.resolve('./benchmark-suite')
|
||||
runSpecSuite(benchmarkSuite, true)
|
||||
|
@ -116,6 +116,7 @@ class AtomApplication
|
||||
handleEvents: ->
|
||||
@on 'application:about', -> Menu.sendActionToFirstResponder('orderFrontStandardAboutPanel:')
|
||||
@on 'application:run-all-specs', -> @runSpecs(exitWhenDone: false, resourcePath: global.devResourcePath)
|
||||
@on 'application:run-benchmarks', -> @runBenchmarks()
|
||||
@on 'application:show-settings', -> (@focusedWindow() ? this).openPath("atom://config")
|
||||
@on 'application:quit', -> app.quit()
|
||||
@on 'application:hide', -> Menu.sendActionToFirstResponder('hide:')
|
||||
@ -272,6 +273,11 @@ class AtomApplication
|
||||
devMode = true
|
||||
new AtomWindow({bootstrapScript, resourcePath, exitWhenDone, isSpec, devMode, specPath})
|
||||
|
||||
runBenchmarks: ->
|
||||
bootstrapScript = 'benchmark/benchmark-bootstrap'
|
||||
isSpec = true # So the spec folder is added to NODE_PATH
|
||||
new AtomWindow({bootstrapScript, @resourcePath, isSpec})
|
||||
|
||||
# Private: Opens a native dialog to prompt the user for a path.
|
||||
#
|
||||
# Once paths are selected, they're opened in a new or existing {AtomWindow}s.
|
||||
|
@ -93,6 +93,7 @@ class RootView extends View
|
||||
|
||||
@command 'application:about', -> ipc.sendChannel('command', 'application:about')
|
||||
@command 'application:run-all-specs', -> ipc.sendChannel('command', 'application:run-all-specs')
|
||||
@command 'application:run-benchmarks', -> ipc.sendChannel('command', 'application:run-benchmarks')
|
||||
@command 'application:show-settings', -> ipc.sendChannel('command', 'application:show-settings')
|
||||
@command 'application:quit', -> ipc.sendChannel('command', 'application:quit')
|
||||
@command 'application:hide', -> ipc.sendChannel('command', 'application:hide')
|
||||
|
Loading…
Reference in New Issue
Block a user