[WIP] #943 - Split bundle via async imports (#1123)

#943 - Split bundle via async imports
This commit is contained in:
Bryan Phelps 2017-12-18 20:30:18 -08:00 committed by GitHub
parent 579986e4be
commit 57929c06a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 430 additions and 154 deletions

3
.gitignore vendored
View File

@ -143,3 +143,6 @@ $RECYCLE.BIN/
.merlin
yarn.lock
# Webpack stats file
stats.json

21
browser/src/CSS.ts Normal file
View File

@ -0,0 +1,21 @@
/**
* CSS.ts
*
* Entry point for loading all of Oni's CSS
*/
export const activate = () => {
require("./overlay.less") // tslint:disable-line
require("./Services/ContextMenu/ContextMenu.less") // tslint:disable-line
require("./Services/Explorer/Explorer.less") // tslint:disable-line
require("./Services/Menu/Menu.less")
require("./Services/Sidebar/Sidebar.less")
require("./UI/components/Error.less")
require("./UI/components/InstallHelp.less")
require("./UI/components/QuickInfo.less")
require("./UI/components/StatusBar.less")
require("./UI/components/Tabs.less")
}

View File

@ -16,7 +16,7 @@ import "rxjs/add/operator/concatMap"
import * as Oni from "oni-api"
import { EventContext, NeovimInstance } from "./../neovim"
import { languageManager, sortTextEdits } from "./../Services/Language"
import * as LanguageManager from "./../Services/Language"
import { PromiseQueue } from "./../Services/Language/PromiseQueue"
import * as SyntaxHighlighting from "./../Services/SyntaxHighlighting"
@ -94,7 +94,7 @@ export class Buffer implements Oni.Buffer {
const textEditsAsArray = textEdits instanceof Array ? textEdits : [textEdits]
const sortedEdits = sortTextEdits(textEditsAsArray)
const sortedEdits = LanguageManager.sortTextEdits(textEditsAsArray)
const deferredEdits = sortedEdits.map((te) => {
return Observable.defer(async () => {
@ -186,7 +186,7 @@ export class Buffer implements Oni.Buffer {
public async getTokenAt(line: number, column: number): Promise<Oni.IToken> {
const result = await this.getLines(line, line + 1)
const tokenRegEx = languageManager.getTokenRegex(this.language)
const tokenRegEx = LanguageManager.getInstance().getTokenRegex(this.language)
const getLastMatchingCharacter = (lineContents: string, character: number, dir: number, regex: RegExp) => {
while (character > 0 && character < lineContents.length) {

View File

@ -29,11 +29,11 @@ import { Colors } from "./../Services/Colors"
import { CallbackCommand, commandManager } from "./../Services/CommandManager"
import { registerBuiltInCommands } from "./../Services/Commands"
import { Completion } from "./../Services/Completion"
import { configuration, IConfigurationValues } from "./../Services/Configuration"
import { Configuration, IConfigurationValues } from "./../Services/Configuration"
import { Errors } from "./../Services/Errors"
import { addInsertModeLanguageFunctionality, LanguageEditorIntegration, languageManager } from "./../Services/Language"
import { addInsertModeLanguageFunctionality, LanguageEditorIntegration, LanguageManager } from "./../Services/Language"
import { ISyntaxHighlighter, NullSyntaxHighlighter, SyntaxHighlighter } from "./../Services/SyntaxHighlighting"
import { getThemeManagerInstance } from "./../Services/Themes"
import { ThemeManager } from "./../Services/Themes"
import { TypingPredictionManager } from "./../Services/TypingPredictionManager"
import { workspace } from "./../Services/Workspace"
@ -101,8 +101,9 @@ export class NeovimEditor extends Editor implements IEditor {
constructor(
private _colors: Colors,
private _config = configuration,
private _themeManager = getThemeManagerInstance(),
private _configuration: Configuration,
private _languageManager: LanguageManager,
private _themeManager: ThemeManager,
) {
super()
@ -112,7 +113,7 @@ export class NeovimEditor extends Editor implements IEditor {
this._bufferManager = new BufferManager(this._neovimInstance)
this._screen = new NeovimScreen()
this._hoverRenderer = new HoverRenderer(this, this._config)
this._hoverRenderer = new HoverRenderer(this, this._configuration)
this._popupMenu = new NeovimPopupMenu(
this._neovimInstance.onShowPopupMenu,
@ -151,7 +152,7 @@ export class NeovimEditor extends Editor implements IEditor {
this._windowManager = new NeovimWindowManager(this._neovimInstance)
this._neovimInstance.onYank.subscribe((yankInfo) => {
if (configuration.getValue("editor.clipboard.enabled")) {
if (this._configuration.getValue("editor.clipboard.enabled")) {
clipboard.writeText(yankInfo.regcontents.join(require("os").EOL))
}
})
@ -163,7 +164,7 @@ export class NeovimEditor extends Editor implements IEditor {
this._neovimInstance.onLeave.subscribe(() => {
// TODO: Only leave if all editors are closed...
if (!configuration.getValue("debug.persistOnNeovimExit")) {
if (!this._configuration.getValue("debug.persistOnNeovimExit")) {
remote.getCurrentWindow().close()
}
})
@ -255,10 +256,10 @@ export class NeovimEditor extends Editor implements IEditor {
addInsertModeLanguageFunctionality(this._cursorMovedI$, this._modeChanged$)
const textMateHighlightingEnabled = this._config.getValue("experimental.editor.textMateHighlighting.enabled")
const textMateHighlightingEnabled = this._configuration.getValue("experimental.editor.textMateHighlighting.enabled")
this._syntaxHighlighter = textMateHighlightingEnabled ? new SyntaxHighlighter() : new NullSyntaxHighlighter()
this._completion = new Completion(this, languageManager, configuration)
this._completion = new Completion(this, this._languageManager, this._configuration)
this._completionMenu = new CompletionMenu()
this._completion.onShowCompletionItems.subscribe((completions) => {
@ -277,7 +278,7 @@ export class NeovimEditor extends Editor implements IEditor {
this._completion.commitItem(item)
})
this._languageIntegration = new LanguageEditorIntegration(this, this._config, languageManager)
this._languageIntegration = new LanguageEditorIntegration(this, this._configuration, this._languageManager)
this._languageIntegration.onShowHover.subscribe((hover) => {
this._hoverRenderer.showQuickInfo(hover.hover, hover.errors)
@ -307,8 +308,8 @@ export class NeovimEditor extends Editor implements IEditor {
this._neovimInstance.autoCommands.executeAutoCommand("FocusGained")
})
this._onConfigChanged(this._config.getValues())
this._config.onConfigurationChanged.subscribe((newValues: Partial<IConfigurationValues>) => this._onConfigChanged(newValues))
this._onConfigChanged(this._configuration.getValues())
this._configuration.onConfigurationChanged.subscribe((newValues: Partial<IConfigurationValues>) => this._onConfigChanged(newValues))
ipcRenderer.on("menu-item-click", (_evt: any, message: string) => {
if (message.startsWith(":")) {
@ -386,7 +387,7 @@ export class NeovimEditor extends Editor implements IEditor {
public async init(filesToOpen: string[]): Promise<void> {
const startOptions: INeovimStartOptions = {
runtimePaths: pluginManager.getAllRuntimePaths(),
transport: configuration.getValue("experimental.neovim.transport"),
transport: this._configuration.getValue("experimental.neovim.transport"),
}
await this._neovimInstance.start(startOptions)
@ -395,7 +396,7 @@ export class NeovimEditor extends Editor implements IEditor {
return
}
VimConfigurationSynchronizer.synchronizeConfiguration(this._neovimInstance, this._config.getValues())
VimConfigurationSynchronizer.synchronizeConfiguration(this._neovimInstance, this._configuration.getValues())
this._themeManager.onThemeChanged.subscribe(() => {
const newTheme = this._themeManager.activeTheme
@ -464,7 +465,7 @@ export class NeovimEditor extends Editor implements IEditor {
this._typingPredictionManager.clearAllPredictions()
if (newMode === "insert" && configuration.getValue("editor.typingPrediction")) {
if (newMode === "insert" && this._configuration.getValue("editor.typingPrediction")) {
this._typingPredictionManager.enable()
} else {
this._typingPredictionManager.disable()
@ -532,9 +533,9 @@ export class NeovimEditor extends Editor implements IEditor {
}
private _onConfigChanged(newValues: Partial<IConfigurationValues>): void {
const fontFamily = this._config.getValue("editor.fontFamily")
const fontSize = addDefaultUnitIfNeeded(this._config.getValue("editor.fontSize"))
const linePadding = this._config.getValue("editor.linePadding")
const fontFamily = this._configuration.getValue("editor.fontFamily")
const fontSize = addDefaultUnitIfNeeded(this._configuration.getValue("editor.fontSize"))
const linePadding = this._configuration.getValue("editor.linePadding")
UI.Actions.setFont(fontFamily, fontSize)
this._neovimInstance.setFont(fontFamily, fontSize, linePadding)
@ -586,8 +587,8 @@ export class NeovimEditor extends Editor implements IEditor {
}
private async _onKeyDown(key: string): Promise<void> {
if (configuration.getValue("debug.fakeLag.neovimInput")) {
await sleep(configuration.getValue("debug.fakeLag.neovimInput"))
if (this._configuration.getValue("debug.fakeLag.neovimInput")) {
await sleep(this._configuration.getValue("debug.fakeLag.neovimInput"))
}
await this._neovimInstance.input(key)

View File

@ -3,7 +3,6 @@
import * as fs from "fs"
import * as os from "os"
import * as path from "path"
import * as sudo from "sudo-prompt"
export const isWindows = () => os.platform() === "win32"
export const isMac = () => os.platform() === "darwin"
@ -33,6 +32,7 @@ export const addToPath = async () => {
}
const _runSudoCommand = async (command: string, options: any) => {
const sudo = await import("sudo-prompt")
return new Promise(resolve => {
sudo.exec(command, options, (error: Error, stdout: string, stderr: string) => {
resolve({error, stdout, stderr})

View File

@ -23,7 +23,7 @@ import { configuration } from "./../../Services/Configuration"
import { contextMenuManager } from "./../../Services/ContextMenu"
import { editorManager } from "./../../Services/EditorManager"
import { inputManager } from "./../../Services/InputManager"
import { languageManager } from "./../../Services/Language"
import * as LanguageManager from "./../../Services/Language"
import { menuManager } from "./../../Services/Menu"
import { recorder } from "./../../Services/Recorder"
import { statusBar } from "./../../Services/StatusBar"
@ -102,7 +102,7 @@ export class Oni extends EventEmitter implements OniApi.Plugin.Api {
}
public get language(): any {
return languageManager
return LanguageManager.getInstance()
}
public get menu(): any /* TODO */ {

View File

@ -1,5 +1,4 @@
import * as ChildProcess from "child_process"
import * as shellEnv from "shell-env"
import * as Platform from "./../../Platform"
import { configuration } from "./../../Services/Configuration"
@ -24,6 +23,7 @@ const mergeSpawnOptions = async (originalSpawnOptions: ChildProcess.ExecOptions
let existingPath: string
try {
const shellEnv = await import("shell-env")
const shellEnvironment = await shellEnv()
process.env = { ...process.env, ...shellEnvironment }
existingPath = process.env.Path || process.env.PATH

View File

@ -37,8 +37,6 @@ export interface IContextMenuProps {
highlightColor: string
}
require("./ContextMenu.less") // tslint:disable-line no-var-requires
export class ContextMenuView extends React.PureComponent<IContextMenuProps, {}> {
public render(): null | JSX.Element {

View File

@ -6,14 +6,14 @@
import * as types from "vscode-languageserver-types"
import * as UI from "./../../UI"
import * as Selectors from "./../../UI/Selectors"
import * as UI from "./../UI"
import * as Selectors from "./../UI/Selectors"
import { ILanguageServerNotificationResponse, languageManager } from "./LanguageManager"
import { ILanguageServerNotificationResponse, LanguageManager } from "./Language"
import * as Helpers from "./../../Plugins/Api/LanguageClient/LanguageClientHelpers"
import * as Helpers from "./../Plugins/Api/LanguageClient/LanguageClientHelpers"
import * as Utility from "./../../Utility"
import * as Utility from "./../Utility"
interface IPublishDiagnosticsParams {
uri: string
@ -35,7 +35,7 @@ export class DiagnosticsDataSource {
}
}
export const listenForDiagnostics = () => {
export const activate = (languageManager: LanguageManager) => {
languageManager.subscribeToLanguageServerNotification("textDocument/publishDiagnostics", (args: ILanguageServerNotificationResponse) => {
const test = args.payload as IPublishDiagnosticsParams

View File

@ -11,7 +11,7 @@ import * as types from "vscode-languageserver-types"
// import * as UI from "./../../UI"
import { contextMenuManager } from "./../ContextMenu"
import { languageManager } from "./LanguageManager"
import * as LanguageManager from "./LanguageManager"
import * as Log from "./../../Log"
import { editorManager } from "./../EditorManager"
@ -25,6 +25,7 @@ let lastFileInfo: any = {}
codeActionsContextMenu.onItemSelected.subscribe(async (selectedItem) => {
const commandName = selectedItem.data
const languageManager = LanguageManager.getInstance()
await languageManager.sendLanguageServerRequest(lastFileInfo.language, lastFileInfo.filePath, "workspace/executeCommand", { command: commandName })
})
@ -57,6 +58,7 @@ const getCodeActions = async (): Promise<types.Command[]> => {
return null
}
const languageManager = LanguageManager.getInstance()
if (languageManager.isLanguageServerAvailable(language)) {
let result: types.Command[] = null
try {

View File

@ -8,7 +8,7 @@ import * as types from "vscode-languageserver-types"
import { INeovimInstance } from "./../../neovim"
import { editorManager } from "./../EditorManager"
import { languageManager } from "./LanguageManager"
import * as LanguageManager from "./LanguageManager"
import * as Helpers from "./../../Plugins/Api/LanguageClient/LanguageClientHelpers"
@ -29,6 +29,7 @@ export const findAllReferences = async () => {
return
}
const languageManager = LanguageManager.getInstance()
if (languageManager.isLanguageServerAvailable(activeBuffer.language)) {
const args = { ...Helpers.bufferToTextDocumentPositionParams(activeBuffer),
context: {

View File

@ -9,13 +9,13 @@ import * as Helpers from "./../../Plugins/Api/LanguageClient/LanguageClientHelpe
import { editorManager } from "./../EditorManager"
import { languageManager } from "./LanguageManager"
import * as LanguageManager from "./LanguageManager"
export const format = async () => {
const activeBuffer = editorManager.activeEditor.activeBuffer
const capabilities = await languageManager.getCapabilitiesForLanguage(activeBuffer.language)
const capabilities = await LanguageManager.getInstance().getCapabilitiesForLanguage(activeBuffer.language)
if (capabilities.documentFormattingProvider) {
await formatDocument()
@ -37,7 +37,7 @@ export const formatDocument = async () => {
let result: types.TextEdit[] = null
try {
result = await languageManager.sendLanguageServerRequest(activeBuffer.language, activeBuffer.filePath, "textDocument/formatting", args)
result = await LanguageManager.getInstance().sendLanguageServerRequest(activeBuffer.language, activeBuffer.filePath, "textDocument/formatting", args)
} catch (ex) {
Log.warn(ex)
}
@ -60,7 +60,7 @@ export const rangeFormatDocument = async () => {
let result: types.TextEdit[] = null
try {
result = await languageManager.sendLanguageServerRequest(activeBuffer.language, activeBuffer.filePath, "textDocument/rangeFormatting", args)
result = await LanguageManager.getInstance().sendLanguageServerRequest(activeBuffer.language, activeBuffer.filePath, "textDocument/rangeFormatting", args)
} catch (ex) {
Log.warn(ex)
}

View File

@ -11,7 +11,7 @@ import * as Helpers from "./../../Plugins/Api/LanguageClient/LanguageClientHelpe
import { LanguageManager } from "./LanguageManager"
import { DiagnosticsDataSource, IDiagnosticsDataSource } from "./Diagnostics"
import { DiagnosticsDataSource, IDiagnosticsDataSource } from "./../Diagnostics"
export interface IHoverResult {
hover: types.Hover

View File

@ -8,7 +8,7 @@ import * as Log from "./../../Log"
import { LanguageClient } from "./LanguageClient"
import { InitializationOptions, LanguageClientProcess, ServerRunOptions } from "./LanguageClientProcess"
import { languageManager } from "./LanguageManager"
import * as LanguageManager from "./LanguageManager"
import { getRootProjectFileFunc } from "./../../Utility"
@ -97,5 +97,5 @@ const createLanguageClientFromConfig = (language: string, config: ILightweightLa
rootPath: pathResolver,
}
const languageClient = new LanguageClient(language, new LanguageClientProcess(serverRunOptions, initializationOptions, configuration))
languageManager.registerLanguageClient(language, languageClient)
LanguageManager.getInstance().registerLanguageClient(language, languageClient)
}

View File

@ -14,13 +14,9 @@ import { Event, IDisposable } from "oni-types"
import * as Log from "./../../Log"
import { configuration, Configuration } from "./../Configuration"
import { editorManager, EditorManager } from "./../EditorManager"
import { ILanguageClient } from "./LanguageClient"
import { IServerCapabilities } from "./ServerCapabilities"
import * as LanguageClientTypes from "./LanguageClientTypes"
import { IServerCapabilities } from "./ServerCapabilities"
import { LanguageClientState, LanguageClientStatusBar } from "./LanguageClientStatusBar"
@ -44,8 +40,8 @@ export class LanguageManager {
private _currentTrackedFile: string = null
constructor(
private _configuration: Configuration = configuration,
private _editorManager: EditorManager = editorManager,
private _configuration: Oni.Configuration,
private _editorManager: Oni.EditorManager,
) {
this._editorManager.allEditors.onBufferEnter.subscribe(async () => this._onBufferEnter())
@ -139,7 +135,7 @@ export class LanguageManager {
}
public getTokenRegex(language: string): RegExp {
const languageSpecificTokenRegex = this._configuration.getValue(`language.${language}.tokenRegex`)
const languageSpecificTokenRegex = this._configuration.getValue(`language.${language}.tokenRegex`) as RegExp
if (languageSpecificTokenRegex) {
return RegExp(languageSpecificTokenRegex, "i")
@ -153,7 +149,7 @@ export class LanguageManager {
}
public getCompletionTriggerCharacters(language: string): string[] {
const languageSpecificTriggerChars = this._configuration.getValue(`language.${language}.completionTriggerCharacters`)
const languageSpecificTriggerChars = this._configuration.getValue(`language.${language}.completionTriggerCharacters`) as string[]
if (languageSpecificTriggerChars) {
return languageSpecificTriggerChars
@ -332,7 +328,7 @@ export class LanguageManager {
}
private async _simulateFakeLag(): Promise<void> {
const delay = this._configuration.getValue("debug.fakeLag.languageServer")
const delay = this._configuration.getValue("debug.fakeLag.languageServer") as number
if (!delay) {
return
} else {
@ -353,4 +349,12 @@ const logDebug = (args: any) => {
}
}
export const languageManager = new LanguageManager()
let _languageManager: LanguageManager = null
export const activate = (configuration: Oni.Configuration, editorManager: Oni.EditorManager): void => {
_languageManager = new LanguageManager(configuration, editorManager)
}
export const getInstance = (): LanguageManager => {
return _languageManager
}

View File

@ -11,7 +11,7 @@ import * as UI from "./../../UI"
import { editorManager } from "./../EditorManager"
import { workspace } from "./../Workspace"
import { languageManager } from "./LanguageManager"
import * as LanguageManager from "./LanguageManager"
const _renameToolTipName = "rename-tool-tip"
let _isRenameActive = false
@ -88,6 +88,7 @@ export const doRename = async (newName: string): Promise<void> => {
newName,
}
const languageManager = LanguageManager.getInstance()
let result = null
try {
result = await languageManager.sendLanguageServerRequest(activeBuffer.language, activeBuffer.filePath, "textDocument/rename", args)

View File

@ -15,7 +15,7 @@ import * as UI from "./../../UI"
import { editorManager } from "./../EditorManager"
import { ILatestCursorAndBufferInfo } from "./addInsertModeLanguageFunctionality"
import { languageManager } from "./LanguageManager"
import * as LanguageManager from "./LanguageManager"
import * as SignatureHelp from "./SignatureHelpView"
export const initUI = (latestCursorAndBufferInfo$: Observable<ILatestCursorAndBufferInfo>, modeChanged$: Observable<Oni.Vim.Mode>) => {
@ -49,6 +49,7 @@ export const initUI = (latestCursorAndBufferInfo$: Observable<ILatestCursorAndBu
}
export const showSignatureHelp = async (language: string, filePath: string, line: number, column: number): Promise<types.SignatureHelp> => {
const languageManager = LanguageManager.getInstance()
if (languageManager.isLanguageServerAvailable(language)) {
const buffer = editorManager.activeEditor.activeBuffer

View File

@ -3,25 +3,18 @@
*
*/
// import * as os from "os"
import * as types from "vscode-languageserver-types"
import * as Oni from "oni-api"
// import { configuration } from "./../Configuration"
// import * as UI from "./../../UI"
import { editorManager } from "./../EditorManager"
import { menuManager } from "./../Menu"
import { gotoPositionInUri } from "./Definition"
import { languageManager } from "./LanguageManager"
import * as LanguageManager from "./LanguageManager"
import * as Helpers from "./../../Plugins/Api/LanguageClient/LanguageClientHelpers"
// import * as Log from "./../../Log"
export const openWorkspaceSymbolsMenu = async () => {
const menu = menuManager.create()
@ -49,6 +42,8 @@ export const openWorkspaceSymbolsMenu = async () => {
const getKey = (si: types.SymbolInformation) => si.name + getDetailFromSymbol(si)
const languageManager = LanguageManager.getInstance()
filterTextChanged$
.debounceTime(25)
.do(() => menu.setLoading(true))
@ -131,6 +126,7 @@ export const openDocumentSymbolsMenu = async () => {
const buffer = editorManager.activeEditor.activeBuffer
const languageManager = LanguageManager.getInstance()
const result: types.SymbolInformation[] = await languageManager.sendLanguageServerRequest(buffer.language, buffer.filePath, "textDocument/documentSymbol", {
textDocument: {
uri: Helpers.wrapPathInFileUri(buffer.filePath),

View File

@ -2,7 +2,6 @@ export * from "./addInsertModeLanguageFunctionality"
export * from "./CodeAction"
export * from "./Definition"
export * from "./DefinitionRequestor"
export * from "./Diagnostics"
export * from "./Edits"
export * from "./FindAllReferences"
export * from "./Formatting"

View File

@ -15,11 +15,6 @@ import { IMenuOptionWithHighlights, menuStore } from "./Menu"
import * as ActionCreators from "./MenuActionCreators"
import * as State from "./MenuState"
/**
* Popup menu
*/
require("./Menu.less") // tslint:disable-line no-var-requires
export interface IMenuProps {
visible: boolean
selectedIndex: number

View File

@ -14,8 +14,6 @@ import { Icon, IconSize } from "./../../UI/Icon"
import { ISidebarEntry, ISidebarState } from "./SidebarStore"
require("./Sidebar.less") // tslint:disable-line
export interface ISidebarIconProps {
active: boolean
iconName: string

View File

@ -13,8 +13,6 @@ import { Icon } from "./../Icon"
import { BufferToScreen, ScreenToPixel } from "./../Coordinates"
require("./Error.less") // tslint:disable-line no-var-requires
export interface IErrorsProps {
errors: types.Diagnostic[]
fontWidthInPixels: number

View File

@ -8,8 +8,6 @@ import { Icon, IconSize } from "./../Icon"
import * as State from "./../State"
require("./InstallHelp.less") // tslint:disable-line no-var-requires
export interface InstallHelpViewProps {
visible: boolean
}

View File

@ -2,8 +2,6 @@ import * as os from "os"
import * as React from "react"
require("./QuickInfo.less") // tslint:disable-line no-var-requires
export interface ITextProps {
text: string
}

View File

@ -9,8 +9,6 @@ import { IState, StatusBarAlignment } from "./../State"
import { addDefaultUnitIfNeeded } from "./../../Font"
require("./StatusBar.less") // tslint:disable-line no-var-requires
export interface StatusBarProps {
items: StatusBarItemProps[]
enabled: boolean

View File

@ -18,8 +18,6 @@ import { Icon } from "./../../UI/Icon"
import { FileIcon } from "./../../Services/FileIcon"
require("./Tabs.less") // tslint:disable-line no-var-requires
export interface ITabProps {
id: number
name: string

View File

@ -21,18 +21,8 @@ import { reducer } from "./Reducer"
import { getActiveDefinition } from "./selectors/DefinitionSelectors"
import * as State from "./State"
import { Colors } from "./../Services/Colors"
import { commandManager } from "./../Services/CommandManager"
import { Configuration } from "./../Services/Configuration"
import { editorManager } from "./../Services/EditorManager"
import { ExplorerSplit } from "./../Services/Explorer/ExplorerSplit"
import { focusManager } from "./../Services/FocusManager"
import { listenForDiagnostics } from "./../Services/Language"
import { SidebarSplit } from "./../Services/Sidebar"
import { windowManager } from "./../Services/WindowManager"
import { workspace } from "./../Services/Workspace"
import { NeovimEditor } from "./../Editor/NeovimEditor"
import { createStore } from "./../Redux"
@ -82,30 +72,10 @@ export const render = (state: State.IState): void => {
</Provider>, hostElement)
}
export const startEditors = async (args: any, colors: Colors, configuration: Configuration): Promise<void> => {
if (configuration.getValue("experimental.sidebar.enabled")) {
const leftDock = windowManager.getDock(2)
leftDock.addSplit(new SidebarSplit(colors))
leftDock.addSplit(new ExplorerSplit(configuration, workspace, commandManager, editorManager))
}
const editor = new NeovimEditor(colors)
editorManager.setActiveEditor(editor)
windowManager.split(0, editor)
await editor.init(args)
}
// Don't execute code that depends on DOM in unit-tests
if (global["window"]) { // tslint:disable-line
updateViewport()
// TODO: Why is this breaking?
window.setTimeout(() => {
listenForDiagnostics()
})
window.addEventListener("resize", updateViewport)
document.body.addEventListener("click", () => focusManager.enforceFocus())
}

View File

@ -8,40 +8,41 @@ import { ipcRenderer } from "electron"
import * as minimist from "minimist"
import * as Log from "./Log"
import * as Performance from "./Performance"
import { pluginManager } from "./Plugins/PluginManager"
import * as AutoClosingPairs from "./Services/AutoClosingPairs"
import { autoUpdater, constructFeedUrl } from "./Services/AutoUpdate"
import * as Colors from "./Services/Colors"
import * as BrowserWindowConfigurationSynchronizer from "./Services/BrowserWindowConfigurationSynchronizer"
import { commandManager } from "./Services/CommandManager"
import { configuration, IConfigurationValues } from "./Services/Configuration"
import { editorManager } from "./Services/EditorManager"
import * as IconThemes from "./Services/IconThemes"
import { inputManager } from "./Services/InputManager"
import { languageManager } from "./Services/Language"
import * as Themes from "./Services/Themes"
import * as SharedNeovimInstance from "./neovim/SharedNeovimInstance"
import { createLanguageClientsFromConfiguration } from "./Services/Language"
import * as UI from "./UI/index"
require("./overlay.less") // tslint:disable-line
import { IConfigurationValues } from "./Services/Configuration/IConfigurationValues"
const start = async (args: string[]): Promise<void> => {
Performance.startMeasure("Oni.Start")
const UI = await import("./UI")
UI.activate()
const parsedArgs = minimist(args)
const configurationPromise = import("./Services/Configuration")
const pluginManagerPromise = import("./Plugins/PluginManager")
const themesPromise = import("./Services/Themes")
const iconThemesPromise = import("./Services/IconThemes")
const startEditorsPromise = import("./startEditors")
const sharedNeovimInstancePromise = import("./neovim/SharedNeovimInstance")
const autoClosingPairsPromise = import("./Services/AutoClosingPairs")
const browserWindowConfigurationSynchronizerPromise = import("./Services/BrowserWindowConfigurationSynchronizer")
const colorsPromise = import("./Services/Colors")
const diagnosticsPromise = import("./Services/Diagnostics")
const editorManagerPromise = import("./Services/EditorManager")
const inputManagerPromise = import("./Services/InputManager")
const languageManagerPromise = import("./Services/Language")
const cssPromise = import("./CSS")
// Helper for debugging:
window["UI"] = UI // tslint:disable-line no-string-literal
Performance.startMeasure("Oni.Start.Config")
const { configuration } = await configurationPromise
const initialConfigParsingError = configuration.getParsingError()
if (initialConfigParsingError) {
Log.error(initialConfigParsingError)
@ -60,41 +61,63 @@ const start = async (args: string[]): Promise<void> => {
configuration.onConfigurationChanged.subscribe(configChange)
Performance.endMeasure("Oni.Start.Config")
const { pluginManager } = await pluginManagerPromise
Performance.startMeasure("Oni.Start.Plugins.Discover")
pluginManager.discoverPlugins()
Performance.endMeasure("Oni.Start.Plugins.Discover")
// TODO: Can these be parallelized?
Performance.startMeasure("Oni.Start.Themes")
const Themes = await themesPromise
const IconThemes = await iconThemesPromise
await Promise.all([
Themes.activate(configuration),
IconThemes.activate(configuration, pluginManager)
])
const Colors = await colorsPromise
Colors.activate(configuration, Themes.getThemeManagerInstance())
UI.Actions.setColors(Themes.getThemeManagerInstance().getColors())
Performance.endMeasure("Oni.Start.Themes")
const BrowserWindowConfigurationSynchronizer = await browserWindowConfigurationSynchronizerPromise
BrowserWindowConfigurationSynchronizer.activate(configuration, Colors.getInstance())
// TODO: Can these be parallelized?
const { editorManager } = await editorManagerPromise
const LanguageManager = await languageManagerPromise
LanguageManager.activate(configuration, editorManager)
const languageManager = LanguageManager.getInstance()
Performance.startMeasure("Oni.Start.Editors")
const SharedNeovimInstance = await sharedNeovimInstancePromise
const { startEditors } = await startEditorsPromise
await Promise.all([
SharedNeovimInstance.activate(),
UI.startEditors(parsedArgs._, Colors.getInstance(), configuration)
startEditors(parsedArgs._, Colors.getInstance(), configuration, languageManager, Themes.getThemeManagerInstance())
])
Performance.endMeasure("Oni.Start.Editors")
Performance.startMeasure("Oni.Start.Activate")
const createLanguageClientsFromConfiguration = LanguageManager.createLanguageClientsFromConfiguration
const Diagnostics = await diagnosticsPromise
Diagnostics.activate(languageManager)
Performance.startMeasure("Oni.Start.Activate")
const api = pluginManager.startApi()
configuration.activate(api)
createLanguageClientsFromConfiguration(configuration.getValues())
const { inputManager } = await inputManagerPromise
const AutoClosingPairs = await autoClosingPairsPromise
AutoClosingPairs.activate(configuration, editorManager, inputManager, languageManager)
Performance.endMeasure("Oni.Start.Activate")
const CSS = await cssPromise
CSS.activate()
UI.Actions.setLoadingComplete()
checkForUpdates()
@ -107,11 +130,15 @@ ipcRenderer.on("init", (_evt: any, message: any) => {
start(message.args)
})
ipcRenderer.on("execute-command", (_evt: any, command: string) => {
ipcRenderer.on("execute-command", async (_evt: any, command: string) => {
const { commandManager } = await import("./Services/CommandManager")
commandManager.executeCommand(command, null)
})
const checkForUpdates = async (): Promise<void> => {
const AutoUpdate = await import("./Services/AutoUpdate")
const { autoUpdater, constructFeedUrl } = AutoUpdate
const feedUrl = await constructFeedUrl("https://api.onivim.io/v1/update")
autoUpdater.onUpdateAvailable.subscribe(() => Log.info("Update available."))

View File

@ -7,6 +7,7 @@ import * as Oni from "oni-api"
import { Event, IEvent } from "oni-types"
import * as Log from "./../Log"
import * as Performance from "./../Performance"
import { EventContext } from "./EventContext"
import { addDefaultUnitIfNeeded, measureFont } from "./../Font"
@ -272,6 +273,7 @@ export class NeovimInstance extends EventEmitter implements INeovimInstance {
}
public start(startOptions?: INeovimStartOptions): Promise<void> {
Performance.startMeasure("NeovimInstance.Start")
this._initPromise = startNeovim(startOptions)
.then((nv) => {
Log.info("NeovimInstance: Neovim started")
@ -357,9 +359,11 @@ export class NeovimInstance extends EventEmitter implements INeovimInstance {
// Workaround for bug in neovim/node-client
// The 'uiAttach' method overrides the new 'nvim_ui_attach' method
Performance.startMeasure("NeovimInstance.Start.Attach")
return this._attachUI(size.cols, size.rows)
.then(async () => {
Log.info("Attach success")
Performance.endMeasure("NeovimInstance.Start.Attach")
// TODO: #702 - Batch these calls via `nvim_call_atomic`
// Override completeopt so Oni works correctly with external popupmenu
@ -368,6 +372,8 @@ export class NeovimInstance extends EventEmitter implements INeovimInstance {
// set title after attaching listeners so we can get the initial title
await this.command("set title")
Performance.endMeasure("NeovimInstance.Start")
this._initComplete = true
},
(err: any) => {

View File

@ -0,0 +1,33 @@
/**
* startEditors.ts
*
* Initialization for the core set of editors
*/
import { NeovimEditor } from "./Editor/NeovimEditor"
import { Colors } from "./Services/Colors"
import { commandManager } from "./Services/CommandManager"
import { Configuration } from "./Services/Configuration"
import { editorManager } from "./Services/EditorManager"
import { ExplorerSplit } from "./Services/Explorer/ExplorerSplit"
import { LanguageManager } from "./Services/Language"
import { SidebarSplit } from "./Services/Sidebar"
import { ThemeManager } from "./Services/Themes"
import { windowManager } from "./Services/WindowManager"
import { workspace } from "./Services/Workspace"
export const startEditors = async (args: any, colors: Colors, configuration: Configuration, languageManager: LanguageManager, themeManager: ThemeManager): Promise<void> => {
if (configuration.getValue("experimental.sidebar.enabled")) {
const leftDock = windowManager.getDock(2)
leftDock.addSplit(new SidebarSplit(colors))
leftDock.addSplit(new ExplorerSplit(configuration, workspace, commandManager, editorManager))
}
const editor = new NeovimEditor(colors, configuration, languageManager, themeManager)
editorManager.setActiveEditor(editor)
windowManager.split(0, editor)
await editor.init(args)
}

View File

@ -9,7 +9,7 @@
"dom",
"es2017"
],
"module": "commonjs",
"module": "esnext",
"moduleResolution": "node",
"newLine": "LF",
"noEmitOnError": true,

View File

@ -29,7 +29,8 @@
"sourceMap": true
},
"include": [
"src/**/*.ts"
"src/**/*.ts",
"test/**/*.ts"
],
"exclude": [
"node_modules"

View File

@ -7,10 +7,14 @@ module.exports = {
],
target: "electron-renderer",
externals: {
"vscode-jsonrpc": "require('vscode-jsonrpc')",
"vscode-textmate": "require('vscode-textmate')",
"vscode-languageserver-types": "require('vscode-languageserver-types')",
"keyboard-layout": "require('keyboard-layout')",
"gifshot": "require('gifshot')"
"gifshot": "require('gifshot')",
"msgpack-lite": "require('msgpack-lite')",
"react": "require('react')",
"react-dom": "require('react-dom')",
},
resolve: {
extensions: [".tsx", ".ts", ".js", ".less"]
@ -50,8 +54,9 @@ module.exports = {
],
output: {
path: path.join(__dirname, "..", "lib", "browser"),
publicPath: "/",
filename: "bundle.js"
publicPath: "http://localhost:8191/",
filename: "bundle.js",
chunkFilename: "[name].bundle.js"
},
node: {
process: false,

View File

@ -1,4 +1,6 @@
var webpack = require("webpack");
const path = require("path")
const webpack = require("webpack")
const baseConfig = require("./webpack.debug.config.js")
@ -11,11 +13,21 @@ const productionConfig = Object.assign({}, baseConfig, {
new webpack.DefinePlugin({
"process.env.NODE_ENV":'"production"'
}),
new webpack.optimize.CommonsChunkPlugin({
async: true,
minChunks: 2,
}),
new BabiliPlugin(),
new OptimizeJsPlugin({
sourceMap: false
})
}),
],
output: {
path: path.join(__dirname, "..", "lib", "browser"),
publicPath: "lib/browser/",
filename: "bundle.js",
chunkFilename: "[name].bundle.js"
},
})
module.exports = productionConfig

View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 151 151" style="enable-background:new 0 0 151 151;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
.st1{fill:url(#SVGID_1_);}
.st2{opacity:0.11;}
.st3{opacity:0.33;}
.st4{fill:none;stroke:#FFFFFF;stroke-width:6;stroke-miterlimit:10;}
.st5{opacity:0.9;}
.st6{fill:#F2F2F2;}
</style>
<circle class="st0" cx="76.8" cy="73.5" r="0.9"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="48.4624" y1="23.0471" x2="107.9057" y2="126.0059">
<stop offset="0" style="stop-color:#00FF00"/>
<stop offset="1" style="stop-color:#00A4FF"/>
</linearGradient>
<circle class="st1" cx="78.2" cy="74.5" r="59.4"/>
<g>
<circle class="st2" cx="76.9" cy="74.9" r="59.8"/>
</g>
<g>
<g class="st3">
<image style="overflow:visible;opacity:0.75;" width="150" height="150" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAEppJREFUeNrsnYty2zwOhUFJsZuk
7f/+j7ltE9+l3Z2xZrHIwYW0ZMkuOaORnKS1ZH4+AEESIKqtttpqe5SW6vPP2ob6wdZnneLzGCps
zw9WmvhnubDc8rMK1sqfJznXKfhZpAwYBnA9OL9/OsjSE8Nknb2/iX4+GhjoPAT+5mkgS08Mk7xG
BymvSxRLQoReD8bvnwqy9MD3q8FkHY3zWkKJ3luDCoHUO6894DzTudrWPRlQDbhu2JGM6+SYSQqY
PQlRb1z3ALZewCXfLz0KYOlBgdLUSDta57WlXhEfC6kSB+jivO4BcJ6SrRqw9ABQaUAhRWrZWV7L
QwMsCpenVBygi3L04NpStIcBLD2ASkWUSULTgbP8GQJMKlcOWBwEBNSZnc/gZwg6T8ksh7+CVQiU
BAkdL8bvOgGXplyeKURK1Qug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m7jSgvNxjd8vkc0+w+IMhwCJOLzIjewaRNIOaauX4W1Gwck0gTwSMMupp6qQV
aeiXNH1Lg2WZxhR05qVZ3ACQJFARsNpMP8tbmRABCwF2NGDygOopf0XILG3pNUrWXkVt0ytPk8QP
afLkaw4VN4XdTIp1JrvgwgmYNgumnFJvtCRUawCLFCc5AWfaSpX0osD2Apz20rhWZErKG3x4JUZO
ZBe98qpwrSYr4pqW7no7rZuAinVkJ3/rAv5VE4CKHMXyqqVpVdPOAXXylhAPa+vMRwUM5YfoCKdU
ao0pHrTPMepjIT8LKRcqNokqmkYKfa86MfCaNxtEEpAgX6wB0HgZb3JCDdGQgwaYhEdeR9afrcrs
PRpYRH76JE/JGrKTk0S2+Ecj715leOt1dH0Z0YOkL3+UvXcpqGSNo2hW7oi5JqG1a6RIPU23EraC
NQNgkUQlXiIS7b0Hw4nX1Ct3Lf/DAvWoYGn3rUHmAUdB8xfZTGHtLvIAiuyffOgOelbILOgssxf1
sSzz6MHzNDA9G1gRyDwz6n0WOdu/rDXwnmkbnrUjnhmyW3+Wo1y3/qyC9WTPeuvnMUz0NxWs+vwV
otpqq622x27/FmAAeIVVl6bUsQgAAAAASUVORK5CYII=" transform="matrix(1 0 0 1 8.7306 5.4757)">
</image>
<circle class="st0" cx="76.8" cy="73.5" r="59.9"/>
</g>
<circle class="st4" cx="76.8" cy="73.5" r="59.9"/>
</g>
<g>
<g class="st5">
<image style="overflow:visible;opacity:0.25;" width="86" height="74" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAABKCAYAAAAhQqMXAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAB09JREFUeNrsnA9zqjoQxTeItve9
7/9Fb7UW5c9rZ8jMuduzmwQQ6H0ykwG12vDzcLK7CYo8t+f2k7aws8/ZyzZsBST8hZCHJUGHmX8f
Ml/7SUC9x8PSYBnA1H6vah4Sz6f2WY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PqpBM66YiBXyNLXHXUUC/pgVs5bFBJQ4i339ogRW0GViE2xpVq9UtYCvFMr9lP2SD
VsAqXfruHe8uF1kb6pZWEBJgIzhrikbD7baOAvYAlimoNxTbkTDM+j2XfotEoLR+uub/9qZwrGVG
+rex9H5TqFuDZXBF0j8t5f0I2S6g7gGsOHVbEf+eL+ue1s2h7gWsV1qUTLCyZQSwZ7Ae4JJBcBdQ
9wh2Tr+Gn34Ce+njIM/tuT235/bc/pfbfwIMACZRxBlTJni6AAAAAElFTkSuQmCC" transform="matrix(1 0 0 1 40.7306 47.4757)">
</image>
<polyline class="st6" points="76.8,98.6 104.2,56.3 49.4,56.3 76.8,98.6 "/>
</g>
</g>
<circle class="st0" cx="117.5" cy="30" r="10"/>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -81,7 +81,7 @@
"build:plugin:oni-plugin-typescript": "cd vim/core/oni-plugin-typescript && npm run build",
"build:test": "cd test && tsc -p tsconfig.json",
"copy-icons": "node build/CopyIcons.js",
"debug:test:unit:browser": "cd browser && tsc -p tsconfig.json && electron-mocha --interactive --debug --renderer --require testHelpers.js --recursive ../lib_test/browser/test",
"debug:test:unit:browser": "cd browser && tsc -p tsconfig.test.json && electron-mocha --interactive --debug --renderer --require testHelpers.js --recursive ../lib_test/browser/test",
"demo": "npm run build:test && mocha -t 30000 lib_test/test/Demo.js",
"dist:win": "build --arch ia32 --publish never",
"pack:win": "node build/BuildSetupTemplate.js && innosetup-compiler dist/setup.iss --verbose --O=dist",
@ -89,7 +89,7 @@
"test:integration": "npm run build:test && mocha -t 30000 lib_test/test/CiTests.js",
"test:stability": "npm run build:test && mocha -t 600000 --recursive lib_test/test/stability",
"test:unit": "npm run test:unit:browser",
"test:unit:browser": "cd browser && tsc -p tsconfig.json && electron-mocha --renderer --require testHelpers.js --recursive ../lib_test/browser/test",
"test:unit:browser": "cd browser && tsc -p tsconfig.test.json && electron-mocha --renderer --require testHelpers.js --recursive ../lib_test/browser/test",
"fix-lint": "npm run fix-lint:browser && npm run fix-lint:main && npm run fix-lint:test",
"fix-lint:browser": "tslint --fix --project browser/tsconfig.json --config tslint.json && tslint --fix --project vim/core/oni-plugin-typescript/tsconfig.json --config tslint.json",
"fix-lint:main": "tslint --fix --project main/tsconfig.json --config tslint.json",
@ -106,7 +106,8 @@
"watch:plugins": "cd vim/core/oni-plugin-typescript && tsc --watch",
"uninstall-global": "npm rm -g oni-vim",
"install-global": "npm install -g oni-vim",
"postinstall": "electron-rebuild && opencollective postinstall"
"postinstall": "electron-rebuild && opencollective postinstall",
"profile:webpack": "webpack --config browser/webpack.production.config.js --profile --json > stats.json && webpack-bundle-analyzer browser/stats.json"
},
"repository": {
"type": "git",
@ -126,6 +127,8 @@
"oni-neovim-binaries": "0.1.0",
"oni-ripgrep": "0.0.3",
"oni-types": "0.0.4",
"react": "16.0.0",
"react-dom": "16.0.0",
"redux-batched-subscribe": "^0.1.6",
"shell-env": "^0.3.0",
"styled-components": "^2.3.0",
@ -183,8 +186,6 @@
"oni-release-downloader": "0.0.8",
"opencollective": "1.0.3",
"optimize-js-plugin": "0.0.4",
"react": "16.0.0",
"react-dom": "16.0.0",
"react-hot-loader": "1.3.1",
"react-motion": "0.5.2",
"react-redux": "5.0.6",
@ -204,6 +205,7 @@
"wcwidth": "1.0.1",
"webdriverio": "4.8.0",
"webpack": "3.5.3",
"webpack-bundle-analyzer": "^2.9.1",
"webpack-dev-server": "2.7.1"
},
"collective": {

View File

@ -173,7 +173,7 @@ acorn@^4.0.3, acorn@^4.0.4:
version "4.0.13"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
acorn@^5.0.0:
acorn@^5.0.0, acorn@^5.1.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.2.1.tgz#317ac7821826c22c702d66189ab8359675f135d7"
@ -415,6 +415,10 @@ async-exit-hook@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/async-exit-hook/-/async-exit-hook-2.0.1.tgz#8bd8b024b0ec9b1c01cccb9af9db29bd717dfaf3"
async-limiter@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
async@2.6.0, async@^2.0.0, async@^2.1.2:
version "2.6.0"
resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4"
@ -1927,6 +1931,10 @@ duplexer3@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
duplexer@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
ecc-jsbn@~0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
@ -1937,7 +1945,7 @@ ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
ejs@^2.5.7, ejs@~2.5.6:
ejs@^2.5.6, ejs@^2.5.7, ejs@~2.5.6:
version "2.5.7"
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.7.tgz#cc872c168880ae3c7189762fd5ffc00896c9518a"
@ -2357,7 +2365,7 @@ expand-template@^1.0.2:
version "1.1.0"
resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-1.1.0.tgz#e09efba977bf98f9ee0ed25abd0c692e02aec3fc"
express@^4.13.3:
express@^4.13.3, express@^4.15.2:
version "4.16.2"
resolved "https://registry.yarnpkg.com/express/-/express-4.16.2.tgz#e35c6dfe2d64b7dca0a5cd4f21781be3299e076c"
dependencies:
@ -2492,6 +2500,10 @@ filename-regex@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
filesize@^3.5.9:
version "3.5.11"
resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.11.tgz#1919326749433bb3cf77368bd158caabcc19e9ee"
fill-range@^2.1.0:
version "2.2.3"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"
@ -2796,6 +2808,12 @@ growl@1.9.2:
version "1.9.2"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"
gzip-size@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-3.0.0.tgz#546188e9bdc337f673772f81660464b389dce520"
dependencies:
duplexer "^0.1.1"
handle-thing@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4"
@ -4268,6 +4286,10 @@ opencollective@1.0.3:
node-fetch "1.6.3"
opn "4.0.2"
opener@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8"
opn@4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95"
@ -6225,6 +6247,10 @@ uid-number@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
ultron@~1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c"
uniq@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"
@ -6519,6 +6545,22 @@ webidl-conversions@^4.0.0:
version "4.0.2"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
webpack-bundle-analyzer@^2.9.1:
version "2.9.1"
resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.9.1.tgz#c2c8e03e8e5768ed288b39ae9e27a8b8d7b9d476"
dependencies:
acorn "^5.1.1"
chalk "^1.1.3"
commander "^2.9.0"
ejs "^2.5.6"
express "^4.15.2"
filesize "^3.5.9"
gzip-size "^3.0.0"
lodash "^4.17.4"
mkdirp "^0.5.1"
opener "^1.4.3"
ws "^3.3.1"
webpack-dev-middleware@^1.11.0:
version "1.12.1"
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.1.tgz#338be3ca930973be1c2ce07d84d275e997e1a25a"
@ -6699,6 +6741,14 @@ write-file-atomic@^2.0.0:
imurmurhash "^0.1.4"
signal-exit "^3.0.2"
ws@^3.3.1:
version "3.3.2"
resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.2.tgz#96c1d08b3fefda1d5c1e33700d3bfaa9be2d5608"
dependencies:
async-limiter "~1.0.0"
safe-buffer "~5.1.0"
ultron "~1.1.0"
xdg-basedir@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4"