From a2b3a0017ff15011d2091a8a348c5b918c220271 Mon Sep 17 00:00:00 2001 From: Jeff Wu Date: Mon, 1 May 2017 19:41:34 -0700 Subject: [PATCH] move js subfolder to ts --- docs/plugins.md | 6 ++-- src/assets/{js => ts}/app.tsx | 0 src/assets/{js => ts}/components/app.tsx | 0 src/assets/{js => ts}/components/block.tsx | 0 .../{js => ts}/components/breadcrumbs.tsx | 0 .../{js => ts}/components/fileInput.tsx | 0 .../{js => ts}/components/hotkeysTable.tsx | 0 src/assets/{js => ts}/components/line.tsx | 0 src/assets/{js => ts}/components/menu.tsx | 0 .../{js => ts}/components/pluginTable.tsx | 0 src/assets/{js => ts}/components/session.tsx | 0 src/assets/{js => ts}/components/settings.tsx | 0 .../components/settings/dataStore.tsx | 0 src/assets/{js => ts}/components/spinner.tsx | 0 src/assets/{js => ts}/config.ts | 0 src/assets/{js => ts}/configurations/vim.ts | 0 src/assets/{js => ts}/cursor.ts | 0 src/assets/{js => ts}/datastore.ts | 0 src/assets/{js => ts}/definitions/basics.ts | 0 src/assets/{js => ts}/definitions/history.ts | 0 src/assets/{js => ts}/definitions/indent.ts | 0 src/assets/{js => ts}/definitions/index.ts | 0 src/assets/{js => ts}/definitions/menu.tsx | 0 src/assets/{js => ts}/definitions/meta.ts | 0 src/assets/{js => ts}/definitions/motions.ts | 0 src/assets/{js => ts}/definitions/zoom.ts | 0 src/assets/{js => ts}/document.ts | 2 +- src/assets/{js => ts}/errors.ts | 0 src/assets/{js => ts}/eventEmitter.ts | 0 src/assets/{js => ts}/keyBindings.ts | 0 src/assets/{js => ts}/keyDefinitions.ts | 2 +- src/assets/{js => ts}/keyEmitter.ts | 2 +- src/assets/{js => ts}/keyHandler.ts | 0 src/assets/{js => ts}/keyMappings.ts | 0 src/assets/{js => ts}/logger.ts | 0 src/assets/{js => ts}/menu.ts | 0 src/assets/{js => ts}/modes.ts | 0 src/assets/{js => ts}/mutations.ts | 0 src/assets/{js => ts}/path.ts | 0 src/assets/{js => ts}/plugins.ts | 0 src/assets/{js => ts}/register.ts | 0 src/assets/{js => ts}/session.ts | 2 +- src/assets/{js => ts}/settings.ts | 0 src/assets/{js => ts}/types.ts | 0 src/assets/{js => ts}/utils.ts | 0 src/assets/{js => ts}/utils/queue.ts | 0 src/assets/{js => ts}/utils/token_unfolder.ts | 0 src/plugins/debug_mode/index.tsx | 2 +- src/plugins/easy_motion/index.tsx | 4 +-- src/plugins/examples/index.ts | 2 +- src/plugins/html/index.tsx | 4 +-- src/plugins/latex/index.tsx | 6 ++-- src/plugins/marks/index.tsx | 32 +++++++++---------- src/plugins/text_formatting/index.tsx | 6 ++-- src/plugins/time_tracking/index.tsx | 8 ++--- src/plugins/todo/index.tsx | 10 +++--- test/testcase.ts | 30 ++++++++--------- test/tests/enter.ts | 2 +- test/tests/marks.ts | 4 +-- test/tests/todo.ts | 2 +- test/tests/yank.ts | 2 +- webpack.dev.js | 2 +- webpack.prod.js | 2 +- 63 files changed, 66 insertions(+), 66 deletions(-) rename src/assets/{js => ts}/app.tsx (100%) rename src/assets/{js => ts}/components/app.tsx (100%) rename src/assets/{js => ts}/components/block.tsx (100%) rename src/assets/{js => ts}/components/breadcrumbs.tsx (100%) rename src/assets/{js => ts}/components/fileInput.tsx (100%) rename src/assets/{js => ts}/components/hotkeysTable.tsx (100%) rename src/assets/{js => ts}/components/line.tsx (100%) rename src/assets/{js => ts}/components/menu.tsx (100%) rename src/assets/{js => ts}/components/pluginTable.tsx (100%) rename src/assets/{js => ts}/components/session.tsx (100%) rename src/assets/{js => ts}/components/settings.tsx (100%) rename src/assets/{js => ts}/components/settings/dataStore.tsx (100%) rename src/assets/{js => ts}/components/spinner.tsx (100%) rename src/assets/{js => ts}/config.ts (100%) rename src/assets/{js => ts}/configurations/vim.ts (100%) rename src/assets/{js => ts}/cursor.ts (100%) rename src/assets/{js => ts}/datastore.ts (100%) rename src/assets/{js => ts}/definitions/basics.ts (100%) rename src/assets/{js => ts}/definitions/history.ts (100%) rename src/assets/{js => ts}/definitions/indent.ts (100%) rename src/assets/{js => ts}/definitions/index.ts (100%) rename src/assets/{js => ts}/definitions/menu.tsx (100%) rename src/assets/{js => ts}/definitions/meta.ts (100%) rename src/assets/{js => ts}/definitions/motions.ts (100%) rename src/assets/{js => ts}/definitions/zoom.ts (100%) rename src/assets/{js => ts}/document.ts (99%) rename src/assets/{js => ts}/errors.ts (100%) rename src/assets/{js => ts}/eventEmitter.ts (100%) rename src/assets/{js => ts}/keyBindings.ts (100%) rename src/assets/{js => ts}/keyDefinitions.ts (98%) rename src/assets/{js => ts}/keyEmitter.ts (97%) rename src/assets/{js => ts}/keyHandler.ts (100%) rename src/assets/{js => ts}/keyMappings.ts (100%) rename src/assets/{js => ts}/logger.ts (100%) rename src/assets/{js => ts}/menu.ts (100%) rename src/assets/{js => ts}/modes.ts (100%) rename src/assets/{js => ts}/mutations.ts (100%) rename src/assets/{js => ts}/path.ts (100%) rename src/assets/{js => ts}/plugins.ts (100%) rename src/assets/{js => ts}/register.ts (100%) rename src/assets/{js => ts}/session.ts (99%) rename src/assets/{js => ts}/settings.ts (100%) rename src/assets/{js => ts}/types.ts (100%) rename src/assets/{js => ts}/utils.ts (100%) rename src/assets/{js => ts}/utils/queue.ts (100%) rename src/assets/{js => ts}/utils/token_unfolder.ts (100%) diff --git a/docs/plugins.md b/docs/plugins.md index a13e41fb..702190c2 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -27,7 +27,7 @@ A plugin registers using Plugins.register(metadata, enable: fn, disable: ?fn) ``` where -- `metadata`: For the detailed format, read the type definitions in [plugins.ts](../src/assets/js/plugins.ts) +- `metadata`: For the detailed format, read the type definitions in [plugins.ts](../src/assets/ts/plugins.ts) - name: string This will be displayed to the user in options. It should not be changed! - version: number @@ -73,7 +73,7 @@ Actions may optionally accept motions and do something with the motion (e.g. move the cursor according to the movement, or delete text according to the movement). To accept a motion, an action's mapping must have a special key '' which means any sequence for a motion. -For other example usages, see the folder [`src/assets/js/definitions`](../src/assets/js/definitions), and the easy-motion plugin. +For other example usages, see the folder [`src/assets/ts/definitions`](../src/assets/ts/definitions), and the easy-motion plugin. ``` api.registerMode(metadata) -> mode @@ -94,7 +94,7 @@ You can also manually call each deregister, but this is not recomended api.deregisterDefaultMappings(mode, mappings) ``` -See [`keyDefinitions.ts`](../src/assets/js/keyDefinitions.ts) for detailed schema for the metadata of each of these. +See [`keyDefinitions.ts`](../src/assets/ts/keyDefinitions.ts) for detailed schema for the metadata of each of these. #### vimflowy internals diff --git a/src/assets/js/app.tsx b/src/assets/ts/app.tsx similarity index 100% rename from src/assets/js/app.tsx rename to src/assets/ts/app.tsx diff --git a/src/assets/js/components/app.tsx b/src/assets/ts/components/app.tsx similarity index 100% rename from src/assets/js/components/app.tsx rename to src/assets/ts/components/app.tsx diff --git a/src/assets/js/components/block.tsx b/src/assets/ts/components/block.tsx similarity index 100% rename from src/assets/js/components/block.tsx rename to src/assets/ts/components/block.tsx diff --git a/src/assets/js/components/breadcrumbs.tsx b/src/assets/ts/components/breadcrumbs.tsx similarity index 100% rename from src/assets/js/components/breadcrumbs.tsx rename to src/assets/ts/components/breadcrumbs.tsx diff --git a/src/assets/js/components/fileInput.tsx b/src/assets/ts/components/fileInput.tsx similarity index 100% rename from src/assets/js/components/fileInput.tsx rename to src/assets/ts/components/fileInput.tsx diff --git a/src/assets/js/components/hotkeysTable.tsx b/src/assets/ts/components/hotkeysTable.tsx similarity index 100% rename from src/assets/js/components/hotkeysTable.tsx rename to src/assets/ts/components/hotkeysTable.tsx diff --git a/src/assets/js/components/line.tsx b/src/assets/ts/components/line.tsx similarity index 100% rename from src/assets/js/components/line.tsx rename to src/assets/ts/components/line.tsx diff --git a/src/assets/js/components/menu.tsx b/src/assets/ts/components/menu.tsx similarity index 100% rename from src/assets/js/components/menu.tsx rename to src/assets/ts/components/menu.tsx diff --git a/src/assets/js/components/pluginTable.tsx b/src/assets/ts/components/pluginTable.tsx similarity index 100% rename from src/assets/js/components/pluginTable.tsx rename to src/assets/ts/components/pluginTable.tsx diff --git a/src/assets/js/components/session.tsx b/src/assets/ts/components/session.tsx similarity index 100% rename from src/assets/js/components/session.tsx rename to src/assets/ts/components/session.tsx diff --git a/src/assets/js/components/settings.tsx b/src/assets/ts/components/settings.tsx similarity index 100% rename from src/assets/js/components/settings.tsx rename to src/assets/ts/components/settings.tsx diff --git a/src/assets/js/components/settings/dataStore.tsx b/src/assets/ts/components/settings/dataStore.tsx similarity index 100% rename from src/assets/js/components/settings/dataStore.tsx rename to src/assets/ts/components/settings/dataStore.tsx diff --git a/src/assets/js/components/spinner.tsx b/src/assets/ts/components/spinner.tsx similarity index 100% rename from src/assets/js/components/spinner.tsx rename to src/assets/ts/components/spinner.tsx diff --git a/src/assets/js/config.ts b/src/assets/ts/config.ts similarity index 100% rename from src/assets/js/config.ts rename to src/assets/ts/config.ts diff --git a/src/assets/js/configurations/vim.ts b/src/assets/ts/configurations/vim.ts similarity index 100% rename from src/assets/js/configurations/vim.ts rename to src/assets/ts/configurations/vim.ts diff --git a/src/assets/js/cursor.ts b/src/assets/ts/cursor.ts similarity index 100% rename from src/assets/js/cursor.ts rename to src/assets/ts/cursor.ts diff --git a/src/assets/js/datastore.ts b/src/assets/ts/datastore.ts similarity index 100% rename from src/assets/js/datastore.ts rename to src/assets/ts/datastore.ts diff --git a/src/assets/js/definitions/basics.ts b/src/assets/ts/definitions/basics.ts similarity index 100% rename from src/assets/js/definitions/basics.ts rename to src/assets/ts/definitions/basics.ts diff --git a/src/assets/js/definitions/history.ts b/src/assets/ts/definitions/history.ts similarity index 100% rename from src/assets/js/definitions/history.ts rename to src/assets/ts/definitions/history.ts diff --git a/src/assets/js/definitions/indent.ts b/src/assets/ts/definitions/indent.ts similarity index 100% rename from src/assets/js/definitions/indent.ts rename to src/assets/ts/definitions/indent.ts diff --git a/src/assets/js/definitions/index.ts b/src/assets/ts/definitions/index.ts similarity index 100% rename from src/assets/js/definitions/index.ts rename to src/assets/ts/definitions/index.ts diff --git a/src/assets/js/definitions/menu.tsx b/src/assets/ts/definitions/menu.tsx similarity index 100% rename from src/assets/js/definitions/menu.tsx rename to src/assets/ts/definitions/menu.tsx diff --git a/src/assets/js/definitions/meta.ts b/src/assets/ts/definitions/meta.ts similarity index 100% rename from src/assets/js/definitions/meta.ts rename to src/assets/ts/definitions/meta.ts diff --git a/src/assets/js/definitions/motions.ts b/src/assets/ts/definitions/motions.ts similarity index 100% rename from src/assets/js/definitions/motions.ts rename to src/assets/ts/definitions/motions.ts diff --git a/src/assets/js/definitions/zoom.ts b/src/assets/ts/definitions/zoom.ts similarity index 100% rename from src/assets/js/definitions/zoom.ts rename to src/assets/ts/definitions/zoom.ts diff --git a/src/assets/js/document.ts b/src/assets/ts/document.ts similarity index 99% rename from src/assets/js/document.ts rename to src/assets/ts/document.ts index 5eb96730..8c93189d 100644 --- a/src/assets/js/document.ts +++ b/src/assets/ts/document.ts @@ -197,7 +197,7 @@ the document itself includes: - the parent/child relationships and collapsed-ness of lines also deals with loading the initial document from the datastore, and serializing the document to a string -Currently, the separation between the Session and Document classes is not very good. (see session.js) +Currently, the separation between the Session and Document classes is not very good. (see session.ts) */ type SearchOptions = {nresults?: number, case_sensitive?: boolean}; diff --git a/src/assets/js/errors.ts b/src/assets/ts/errors.ts similarity index 100% rename from src/assets/js/errors.ts rename to src/assets/ts/errors.ts diff --git a/src/assets/js/eventEmitter.ts b/src/assets/ts/eventEmitter.ts similarity index 100% rename from src/assets/js/eventEmitter.ts rename to src/assets/ts/eventEmitter.ts diff --git a/src/assets/js/keyBindings.ts b/src/assets/ts/keyBindings.ts similarity index 100% rename from src/assets/js/keyBindings.ts rename to src/assets/ts/keyBindings.ts diff --git a/src/assets/js/keyDefinitions.ts b/src/assets/ts/keyDefinitions.ts similarity index 98% rename from src/assets/js/keyDefinitions.ts rename to src/assets/ts/keyDefinitions.ts index a7aa56e1..62eb19ec 100644 --- a/src/assets/js/keyDefinitions.ts +++ b/src/assets/ts/keyDefinitions.ts @@ -7,7 +7,7 @@ import { ModeId, CursorOptions } from './types'; // NOTE: this is a special key, which accepts any motion keys. // It causes definition functions to take an extra cursor argument. -// For more info/context, see keyBindings.js and definitions of CHANGE/DELETE/YANK +// For more info/context, see keyBindings.ts and definitions of CHANGE/DELETE/YANK export const motionKey = ''; type MotionName = string; diff --git a/src/assets/js/keyEmitter.ts b/src/assets/ts/keyEmitter.ts similarity index 97% rename from src/assets/js/keyEmitter.ts rename to src/assets/ts/keyEmitter.ts index c1ac4db6..06a40b50 100644 --- a/src/assets/js/keyEmitter.ts +++ b/src/assets/ts/keyEmitter.ts @@ -11,7 +11,7 @@ A key corresponds to a keypress in the browser, including modifiers/special keys The core function is to take browser keypress events, and normalize the key to have a string representation. -For more info, see its consumer, keyHandler.js, as well as keyBindings.js +For more info, see its consumer, keyHandler.ts, as well as keyBindings.ts Note that one-character keys are treated specially, in that they are insertable in insert mode. */ diff --git a/src/assets/js/keyHandler.ts b/src/assets/ts/keyHandler.ts similarity index 100% rename from src/assets/js/keyHandler.ts rename to src/assets/ts/keyHandler.ts diff --git a/src/assets/js/keyMappings.ts b/src/assets/ts/keyMappings.ts similarity index 100% rename from src/assets/js/keyMappings.ts rename to src/assets/ts/keyMappings.ts diff --git a/src/assets/js/logger.ts b/src/assets/ts/logger.ts similarity index 100% rename from src/assets/js/logger.ts rename to src/assets/ts/logger.ts diff --git a/src/assets/js/menu.ts b/src/assets/ts/menu.ts similarity index 100% rename from src/assets/js/menu.ts rename to src/assets/ts/menu.ts diff --git a/src/assets/js/modes.ts b/src/assets/ts/modes.ts similarity index 100% rename from src/assets/js/modes.ts rename to src/assets/ts/modes.ts diff --git a/src/assets/js/mutations.ts b/src/assets/ts/mutations.ts similarity index 100% rename from src/assets/js/mutations.ts rename to src/assets/ts/mutations.ts diff --git a/src/assets/js/path.ts b/src/assets/ts/path.ts similarity index 100% rename from src/assets/js/path.ts rename to src/assets/ts/path.ts diff --git a/src/assets/js/plugins.ts b/src/assets/ts/plugins.ts similarity index 100% rename from src/assets/js/plugins.ts rename to src/assets/ts/plugins.ts diff --git a/src/assets/js/register.ts b/src/assets/ts/register.ts similarity index 100% rename from src/assets/js/register.ts rename to src/assets/ts/register.ts diff --git a/src/assets/js/session.ts b/src/assets/ts/session.ts similarity index 99% rename from src/assets/js/session.ts rename to src/assets/ts/session.ts index 5c280f42..877848a2 100644 --- a/src/assets/js/session.ts +++ b/src/assets/ts/session.ts @@ -54,7 +54,7 @@ a Session represents a session with a vimflowy document It holds a Cursor, a Document object It exposes methods for manipulation of the document, and movement of the cursor -Currently, the separation between the Session and Document classes is not very good. (see document.js) +Currently, the separation between the Session and Document classes is not very good. (see document.ts) Ideally, session shouldn't do much more than handle cursors and history */ diff --git a/src/assets/js/settings.ts b/src/assets/ts/settings.ts similarity index 100% rename from src/assets/js/settings.ts rename to src/assets/ts/settings.ts diff --git a/src/assets/js/types.ts b/src/assets/ts/types.ts similarity index 100% rename from src/assets/js/types.ts rename to src/assets/ts/types.ts diff --git a/src/assets/js/utils.ts b/src/assets/ts/utils.ts similarity index 100% rename from src/assets/js/utils.ts rename to src/assets/ts/utils.ts diff --git a/src/assets/js/utils/queue.ts b/src/assets/ts/utils/queue.ts similarity index 100% rename from src/assets/js/utils/queue.ts rename to src/assets/ts/utils/queue.ts diff --git a/src/assets/js/utils/token_unfolder.ts b/src/assets/ts/utils/token_unfolder.ts similarity index 100% rename from src/assets/js/utils/token_unfolder.ts rename to src/assets/ts/utils/token_unfolder.ts diff --git a/src/plugins/debug_mode/index.tsx b/src/plugins/debug_mode/index.tsx index 7d1efb87..628bf09b 100644 --- a/src/plugins/debug_mode/index.tsx +++ b/src/plugins/debug_mode/index.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; // tslint:disable-line no-unused-variable -import { registerPlugin } from '../../assets/js/plugins'; +import { registerPlugin } from '../../assets/ts/plugins'; registerPlugin({ name: 'ID Debug Mode', diff --git a/src/plugins/easy_motion/index.tsx b/src/plugins/easy_motion/index.tsx index 6a563fea..a2e1eee0 100644 --- a/src/plugins/easy_motion/index.tsx +++ b/src/plugins/easy_motion/index.tsx @@ -1,8 +1,8 @@ import * as _ from 'lodash'; import * as React from 'react'; // tslint:disable-line no-unused-variable -import Path from '../../assets/js/path'; -import { registerPlugin } from '../../assets/js/plugins'; +import Path from '../../assets/ts/path'; +import { registerPlugin } from '../../assets/ts/plugins'; type EasyMotionMappings = { key_to_path: {[key: string]: Path}, diff --git a/src/plugins/examples/index.ts b/src/plugins/examples/index.ts index 3d4ba907..9b17537f 100644 --- a/src/plugins/examples/index.ts +++ b/src/plugins/examples/index.ts @@ -1,4 +1,4 @@ -import { registerPlugin } from '../../assets/js/plugins'; +import { registerPlugin } from '../../assets/ts/plugins'; registerPlugin({ name: 'Hello World example', diff --git a/src/plugins/html/index.tsx b/src/plugins/html/index.tsx index cea61553..4054e60c 100644 --- a/src/plugins/html/index.tsx +++ b/src/plugins/html/index.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; // tslint:disable-line no-unused-variable -import { Token, RegexTokenizerSplitter, EmitFn, Tokenizer } from '../../assets/js/utils/token_unfolder'; -import { registerPlugin } from '../../assets/js/plugins'; +import { Token, RegexTokenizerSplitter, EmitFn, Tokenizer } from '../../assets/ts/utils/token_unfolder'; +import { registerPlugin } from '../../assets/ts/plugins'; const htmlTypes: Array = [ 'div', diff --git a/src/plugins/latex/index.tsx b/src/plugins/latex/index.tsx index 314b58f7..a371ce5c 100644 --- a/src/plugins/latex/index.tsx +++ b/src/plugins/latex/index.tsx @@ -2,9 +2,9 @@ import * as React from 'react'; // tslint:disable-line no-unused-variable import * as katex from 'katex'; import 'katex/dist/katex.min.css'; -import { Tokenizer, Token, RegexTokenizerSplitter, EmitFn } from '../../assets/js/utils/token_unfolder'; -import { registerPlugin } from '../../assets/js/plugins'; -import { matchWordRegex } from '../../assets/js/utils'; +import { Tokenizer, Token, RegexTokenizerSplitter, EmitFn } from '../../assets/ts/utils/token_unfolder'; +import { registerPlugin } from '../../assets/ts/plugins'; +import { matchWordRegex } from '../../assets/ts/utils'; registerPlugin( { diff --git a/src/plugins/marks/index.tsx b/src/plugins/marks/index.tsx index a601c842..7dde0b18 100644 --- a/src/plugins/marks/index.tsx +++ b/src/plugins/marks/index.tsx @@ -1,22 +1,22 @@ import * as _ from 'lodash'; import * as React from 'react'; // tslint:disable-line no-unused-variable -import { registerPlugin, PluginApi } from '../../assets/js/plugins'; -import Menu from '../../assets/js/menu'; -import * as DataStore from '../../assets/js/datastore'; -import Document from '../../assets/js/document'; -import Session from '../../assets/js/session'; -import LineComponent from '../../assets/js/components/line'; -import Mutation from '../../assets/js/mutations'; -import * as errors from '../../assets/js/errors'; -import { Logger } from '../../assets/js/logger'; -import Path from '../../assets/js/path'; -import { Row } from '../../assets/js/types'; -import { PartialUnfolder, Token, EmitFn, Tokenizer } from '../../assets/js/utils/token_unfolder'; - -import { SINGLE_LINE_MOTIONS } from '../../assets/js/definitions/motions'; -import { INSERT_MOTION_MAPPINGS } from '../../assets/js/configurations/vim'; -import { motionKey } from '../../assets/js/keyDefinitions'; +import { registerPlugin, PluginApi } from '../../assets/ts/plugins'; +import Menu from '../../assets/ts/menu'; +import * as DataStore from '../../assets/ts/datastore'; +import Document from '../../assets/ts/document'; +import Session from '../../assets/ts/session'; +import LineComponent from '../../assets/ts/components/line'; +import Mutation from '../../assets/ts/mutations'; +import * as errors from '../../assets/ts/errors'; +import { Logger } from '../../assets/ts/logger'; +import Path from '../../assets/ts/path'; +import { Row } from '../../assets/ts/types'; +import { PartialUnfolder, Token, EmitFn, Tokenizer } from '../../assets/ts/utils/token_unfolder'; + +import { SINGLE_LINE_MOTIONS } from '../../assets/ts/definitions/motions'; +import { INSERT_MOTION_MAPPINGS } from '../../assets/ts/configurations/vim'; +import { motionKey } from '../../assets/ts/keyDefinitions'; // TODO: do this elsewhere declare const process: any; diff --git a/src/plugins/text_formatting/index.tsx b/src/plugins/text_formatting/index.tsx index 82d61eef..221098c9 100644 --- a/src/plugins/text_formatting/index.tsx +++ b/src/plugins/text_formatting/index.tsx @@ -2,9 +2,9 @@ import * as React from 'react'; // tslint:disable-line no-unused-variable import './index.sass'; -import { hideBorderAndModify, RegexTokenizerModifier } from '../../assets/js/utils/token_unfolder'; -import { registerPlugin } from '../../assets/js/plugins'; -import { matchWordRegex } from '../../assets/js/utils'; +import { hideBorderAndModify, RegexTokenizerModifier } from '../../assets/ts/utils/token_unfolder'; +import { registerPlugin } from '../../assets/ts/plugins'; +import { matchWordRegex } from '../../assets/ts/utils'; const boldClass = 'bold'; const italicsClass = 'italic'; diff --git a/src/plugins/time_tracking/index.tsx b/src/plugins/time_tracking/index.tsx index c1cf3dd7..20775946 100644 --- a/src/plugins/time_tracking/index.tsx +++ b/src/plugins/time_tracking/index.tsx @@ -21,10 +21,10 @@ NOTES: import * as $ from 'jquery'; import * as React from 'react'; // tslint:disable-line no-unused-variable -import { registerPlugin, PluginApi } from '../../assets/js/plugins'; -import { Logger } from '../../assets/js/logger'; -import Path from '../../assets/js/path'; -import { Row } from '../../assets/js/types'; +import { registerPlugin, PluginApi } from '../../assets/ts/plugins'; +import { Logger } from '../../assets/ts/logger'; +import Path from '../../assets/ts/path'; +import { Row } from '../../assets/ts/types'; function pad(num: number, length: number, padChar: string = '0') { const val = '' + num; diff --git a/src/plugins/todo/index.tsx b/src/plugins/todo/index.tsx index 3bc8e90d..8b997d14 100644 --- a/src/plugins/todo/index.tsx +++ b/src/plugins/todo/index.tsx @@ -2,11 +2,11 @@ import * as _ from 'lodash'; import './index.sass'; -import { hideBorderAndModify, RegexTokenizerModifier } from '../../assets/js/utils/token_unfolder'; -import { registerPlugin } from '../../assets/js/plugins'; -import { matchWordRegex } from '../../assets/js/utils'; -import { Row } from '../../assets/js/types'; -import Session from '../../assets/js/session'; +import { hideBorderAndModify, RegexTokenizerModifier } from '../../assets/ts/utils/token_unfolder'; +import { registerPlugin } from '../../assets/ts/plugins'; +import { matchWordRegex } from '../../assets/ts/utils'; +import { Row } from '../../assets/ts/types'; +import Session from '../../assets/ts/session'; const strikethroughClass = 'strikethrough'; diff --git a/test/testcase.ts b/test/testcase.ts index e7032862..a67d3272 100644 --- a/test/testcase.ts +++ b/test/testcase.ts @@ -3,21 +3,21 @@ import 'mocha'; import * as _ from 'lodash'; -import { InMemory } from '../src/assets/js/datastore'; -import Document from '../src/assets/js/document'; -import Session from '../src/assets/js/session'; -import Register, { RegisterTypes, SerializedRegister } from '../src/assets/js/register'; -import '../src/assets/js/definitions'; -import mainDefinitions from '../src/assets/js/keyDefinitions'; -import KeyBindings from '../src/assets/js/keyBindings'; -import Config from '../src/assets/js/config'; -import vimConfig from '../src/assets/js/configurations/vim'; -import KeyHandler from '../src/assets/js/keyHandler'; -import logger, * as Logger from '../src/assets/js/logger'; -import { PluginsManager, PluginStatus } from '../src/assets/js/plugins'; -import Cursor from '../src/assets/js/cursor'; -import Path from '../src/assets/js/path'; -import { SerializedBlock, Row, Col, Key } from '../src/assets/js/types'; +import { InMemory } from '../src/assets/ts/datastore'; +import Document from '../src/assets/ts/document'; +import Session from '../src/assets/ts/session'; +import Register, { RegisterTypes, SerializedRegister } from '../src/assets/ts/register'; +import '../src/assets/ts/definitions'; +import mainDefinitions from '../src/assets/ts/keyDefinitions'; +import KeyBindings from '../src/assets/ts/keyBindings'; +import Config from '../src/assets/ts/config'; +import vimConfig from '../src/assets/ts/configurations/vim'; +import KeyHandler from '../src/assets/ts/keyHandler'; +import logger, * as Logger from '../src/assets/ts/logger'; +import { PluginsManager, PluginStatus } from '../src/assets/ts/plugins'; +import Cursor from '../src/assets/ts/cursor'; +import Path from '../src/assets/ts/path'; +import { SerializedBlock, Row, Col, Key } from '../src/assets/ts/types'; // logger.setLevel(Logger.LEVEL.DEBUG); logger.setStream(Logger.STREAM.QUEUE); diff --git a/test/tests/enter.ts b/test/tests/enter.ts index 52a1a897..d8e2c838 100644 --- a/test/tests/enter.ts +++ b/test/tests/enter.ts @@ -1,6 +1,6 @@ /* globals describe, it */ import TestCase from '../testcase'; -import { RegisterTypes } from '../../src/assets/js/register'; +import { RegisterTypes } from '../../src/assets/ts/register'; describe('enter', function() { it('works in basic case', async function() { diff --git a/test/tests/marks.ts b/test/tests/marks.ts index ac34c129..cf0cbd7a 100644 --- a/test/tests/marks.ts +++ b/test/tests/marks.ts @@ -1,8 +1,8 @@ /* globals describe, it */ import TestCase from '../testcase'; import * as Marks from '../../src/plugins/marks'; -import '../../src/assets/js/plugins'; -import { Row } from '../../src/assets/js/types'; +import '../../src/assets/ts/plugins'; +import { Row } from '../../src/assets/ts/types'; // Testing class MarksTestCase extends TestCase { diff --git a/test/tests/todo.ts b/test/tests/todo.ts index 01248122..e3ae9ede 100644 --- a/test/tests/todo.ts +++ b/test/tests/todo.ts @@ -1,7 +1,7 @@ /* globals describe, it */ import TestCase from '../testcase'; import * as Todo from '../../src/plugins/todo'; -import '../../src/assets/js/plugins'; +import '../../src/assets/ts/plugins'; const toggleStrikethroughKey = 'ctrl+enter'; diff --git a/test/tests/yank.ts b/test/tests/yank.ts index 0e5863a4..06cf19a5 100644 --- a/test/tests/yank.ts +++ b/test/tests/yank.ts @@ -1,6 +1,6 @@ /* globals describe, it */ import TestCase from '../testcase'; -import { RegisterTypes } from '../../src/assets/js/register'; +import { RegisterTypes } from '../../src/assets/ts/register'; describe('yank', function() { describe('characters', function() { diff --git a/webpack.dev.js b/webpack.dev.js index 3506aa34..0f9cb3a3 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -9,7 +9,7 @@ module.exports = { entry: [ 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server', - './src/assets/js/app.tsx' + './src/assets/ts/app.tsx' ], module: { loaders: [ diff --git a/webpack.prod.js b/webpack.prod.js index 7e7b6cff..433df9a9 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -5,7 +5,7 @@ var SRC_DIR = path.join(__dirname, 'src'); module.exports = { devtool: 'source-map', - entry: './src/assets/js/app.tsx', + entry: './src/assets/ts/app.tsx', module: { loaders: [ {