Skip to content

Commit b3ff2fe

Browse files
committed
Move components to ./src/components
1 parent 7ed2662 commit b3ff2fe

14 files changed

+27
-26
lines changed

src/cell.tsx renamed to src/components/cell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
*/
2222

2323
import { Component, h } from "preact";
24+
import { delay } from "../util";
2425
import { CodeMirrorComponent } from "./codemirror";
25-
import { delay } from "./util";
2626

2727
export const cellExecuteQueue: Cell[] = [];
2828

src/codemirror.tsx renamed to src/components/codemirror.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
// React wrapper around CodeMirror editor.
1717

1818
// tslint:disable:no-reference
19-
/// <reference path="../node_modules/@types/codemirror/index.d.ts" />
19+
/// <reference path="../../node_modules/@types/codemirror/index.d.ts" />
2020

2121
import { Component, h } from "preact";
22-
import { normalizeCode } from "./common";
22+
import { normalizeCode } from "../common";
2323

2424
const codeMirrorElements = new Map<string, Element>();
2525

src/index.tsx renamed to src/components/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
// tslint:disable:variable-name
1616
import { readFileSync } from "fs";
1717
import { h } from "preact";
18-
import { GlobalHeader } from "./common";
18+
import { GlobalHeader } from "../common";
1919

2020
export const PropelIndex = props => {
21-
let md = readFileSync(__dirname + "/../README.md", "utf8");
21+
console.log(__dirname);
22+
let md = readFileSync(__dirname + "/../../README.md", "utf8");
2223
md = "<p>" + md.replace(/\n\n/g, "\n\n<p>");
2324
return (
2425
<div class="index">

src/inspector.tsx renamed to src/components/inspector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import {
1919
InspectorData,
2020
PropertyDescriptor,
2121
ValueDescriptor
22-
} from "./serializer";
23-
import { IS_WEB, isNumericalKey, randomString } from "./util";
22+
} from "../serializer";
23+
import { IS_WEB, isNumericalKey, randomString } from "../util";
2424

2525
type ElementLike = JSX.Element | string | null;
2626
type ElementList = ElementLike[];

src/list.tsx renamed to src/components/list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
*/
2020

2121
import { Component, h } from "preact";
22+
import { NbInfo } from "../types";
2223
import { NotebookPreview } from "./preview";
23-
import { NbInfo } from "./types";
2424

2525
export interface NotebookListProps {
2626
// List of notebooks we would like to render.

src/notebook.tsx renamed to src/components/notebook.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
*/
2020

2121
import { Component, h } from "preact";
22+
import { docTitle, UserTitle } from "../common";
23+
import * as db from "../db";
24+
import { OutputHandlerDOM } from "../output_handler";
25+
import * as types from "../types";
26+
import { createResolvable, IS_WEB, randomString, Resolvable } from "../util";
27+
import { createRPCHandler, VM } from "../vm";
2228
import { Cell, drainExecuteQueue, OUTPUT_ID_PREFIX } from "./cell";
23-
import { docTitle, UserTitle } from "./common";
24-
import * as db from "./db";
25-
import { OutputHandlerDOM } from "./output_handler";
26-
import * as types from "./types";
27-
import { createResolvable, IS_WEB, randomString, Resolvable } from "./util";
28-
import { createRPCHandler, VM } from "./vm";
2929

3030
const newNotebookText = "// New Notebook. Insert code here.";
3131
const DEFAULT_TITLE = IS_WEB && document.title;

src/preview.tsx renamed to src/components/preview.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
*/
2020

2121
import { Component, h } from "preact";
22-
import { Avatar, docTitle, fmtDate } from "./common";
23-
import * as db from "./db";
24-
import * as types from "./types";
22+
import { Avatar, docTitle, fmtDate } from "../common";
23+
import * as db from "../db";
24+
import * as types from "../types";
2525

2626
export interface NotebookPreviewProps {
2727
notebook: types.NbInfo;

src/profile.tsx renamed to src/components/profile.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
*/
2020

2121
import { Component, h } from "preact";
22-
import { newNotebookButton, UserTitle } from "./common";
22+
import { newNotebookButton, UserTitle } from "../common";
23+
import * as types from "../types";
2324
import { NotebookList } from "./list";
24-
import * as types from "./types";
2525

2626
export interface ProfileProps {
2727
userInfo: types.UserInfo;

src/inspector_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { h, render } from "preact";
22
import { test, testBrowser } from "../tools/tester";
3-
import { Inspector } from "./inspector";
3+
import { Inspector } from "./components/inspector";
44
import { describe, DescriptorSet, InspectorOptions } from "./serializer";
55
import { assertEqual } from "./util";
66

src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { h, render, rerender } from "preact";
2-
import { drainExecuteQueue } from "./cell";
2+
import { drainExecuteQueue } from "./components/cell";
33
import { enableFirebase } from "./db";
44
import { Router } from "./pages";
55
import { assert, IS_WEB } from "./util";

0 commit comments

Comments
 (0)