Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
chore: split preview-related source to distinct folder
Browse files Browse the repository at this point in the history
  • Loading branch information
marionebl authored and TheReincarnator committed May 2, 2018
1 parent b95ae6d commit e7e8534
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/electron/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import * as express from 'express';
import * as Http from 'http';
import { ServerMessageType } from '../message';
import * as Path from 'path';
import { patternIdToWebpackName } from './pattern-id-to-webpack-name';
import { previewDocument } from './preview-document';
import { patternIdToWebpackName } from '../preview/pattern-id-to-webpack-name';
import { previewDocument } from '../preview/preview-document';
import * as QueryString from 'query-string';
import { Store } from '../store/store';
import { Styleguide } from '../store/styleguide/styleguide';
Expand All @@ -15,6 +15,10 @@ import { OPEN, Server as WebsocketServer } from 'ws';
// memory-fs typings on @types are faulty
const MemoryFs = require('memory-fs');

const PREVIEW_PATH = require.resolve('../preview/preview');
const LOADER_PATH = require.resolve('../preview/components-loader');
const RENDERER_PATH = require.resolve('../preview/preview-renderer');

export interface ServerOptions {
port: number;
}
Expand Down Expand Up @@ -48,10 +52,6 @@ interface WebpackMessage {
// tslint:disable-next-line:no-any
type Queue = WebpackMessage[];

const PREVIEW_PATH = require.resolve('./preview');
const LOADER_PATH = require.resolve('./loader');
const RENDERER_PATH = require.resolve('./preview-renderer');

export async function createServer(opts: ServerOptions): Promise<EventEmitter> {
const store = Store.getInstance();
store.openFromPreferences();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e7e8534

Please sign in to comment.