Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readme improvements WIP #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mikob
Copy link

@mikob mikob commented Jul 20, 2020

Hi!

Thanks for doing all this great work making rangy up-to-date. Would you mind making the "issues" tab available so more people can collaborate on top of the work you started here?

Also, I want to add support for the TextRange module. Would you be willing to take a PR for that once I get things working?

I tried to get this working but ran into a couple problems:

  1. Could not get dev env setup.
  • yarn run dev doesn't work.
  • yarn tsc:es2018 has the following errors:
$ tsc -b

``` packages/classapplier/src/index.ts:16:22 - error TS2307: Cannot find module '@rangy/core'.

16 import * as api from "@rangy/core";
~~~~~~~~~~~~~

packages/classapplier/src/index.ts:17:27 - error TS2307: Cannot find module '@rangy/core'.

17 import {dom, Module} from "@rangy/core";
~~~~~~~~~~~~~

packages/selectionsaverestore/src/index.ts:16:22 - error TS2307: Cannot find module '@rangy/core'.

16 import * as api from "@rangy/core";
~~~~~~~~~~~~~

packages/selectionsaverestore/src/index.ts:17:37 - error TS2307: Cannot find module '@rangy/core'.

17 import {Module, dom, features} from "@rangy/core";
~~~~~~~~~~~~~

packages/serializer/src/index.ts:22:22 - error TS2307: Cannot find module '@rangy/core'.

22 import * as api from "@rangy/core";
~~~~~~~~~~~~~

packages/serializer/src/index.ts:23:27 - error TS2307: Cannot find module '@rangy/core'.

23 import {dom, Module} from "@rangy/core";
~~~~~~~~~~~~~

packages/util/src/index.ts:15:22 - error TS2307: Cannot find module '@rangy/core'.

15 import * as api from "@rangy/core";
~~~~~~~~~~~~~

packages/util/src/index.ts:20:8 - error TS2307: Cannot find module '@rangy/core'.

20 } from "@rangy/core";
~~~~~~~~~~~~~

packages/util/src/index.ts:26:14 - error TS2339: Property 'deleteFromDocument' does not exist on type 'WrappedSelection'.

26 this.deleteFromDocument();
~~~~~~~~~~~~~~~~~~

packages/util/src/index.ts:27:26 - error TS2339: Property 'getRangeAt' does not exist on type 'WrappedSelection'.

27 var range = this.getRangeAt(0);
~~~~~~~~~~

packages/util/src/index.ts:30:14 - error TS2339: Property 'setSingleRange' does not exist on type 'WrappedSelection'.

30 this.setSingleRange(range);
~~~~~~~~~~~~~~

packages/util/src/index.ts:34:14 - error TS2339: Property 'deleteFromDocument' does not exist on type 'WrappedSelection'.

34 this.deleteFromDocument();
~~~~~~~~~~~~~~~~~~

packages/util/src/index.ts:35:28 - error TS2339: Property 'getRangeAt' does not exist on type 'WrappedSelection'.

35 const range = this.getRangeAt(0);
~~~~~~~~~~

packages/util/src/index.ts:42:14 - error TS2339: Property 'setSingleRange' does not exist on type 'WrappedSelection'.

42 this.setSingleRange(range);
~~~~~~~~~~~~~~

packages/util/src/index.ts:46:42 - error TS2339: Property 'win' does not exist on type 'WrappedSelection'.

46 var range = api.createRange(this.win);
~~~

packages/util/src/index.ts:48:14 - error TS2339: Property 'setSingleRange' does not exist on type 'WrappedSelection'.

48 this.setSingleRange(range);
~~~~~~~~~~~~~~

packages/util/src/index.ts:54:14 - error TS2339: Property 'deleteContents' does not exist on type 'DomRange'.

54 this.deleteContents();
~~~~~~~~~~~~~~

packages/util/src/index.ts:55:29 - error TS2339: Property 'getDocument' does not exist on type 'DomRange'.

55 var textNode = this.getDocument().createTextNode(text);
~~~~~~~~~~~

packages/util/src/index.ts:56:14 - error TS2339: Property 'insertNode' does not exist on type 'DomRange'.

56 this.insertNode(textNode);
~~~~~~~~~~

packages/util/src/index.ts:60:14 - error TS2339: Property 'deleteContents' does not exist on type 'DomRange'.

60 this.deleteContents();
~~~~~~~~~~~~~~

packages/util/src/index.ts:61:25 - error TS2339: Property 'createContextualFragment' does not exist on type 'DomRange'.

61 var frag = this.createContextualFragment(html);
~~~~~~~~~~~~~~~~~~~~~~~~

packages/util/src/index.ts:62:14 - error TS2339: Property 'insertNode' does not exist on type 'DomRange'.

62 this.insertNode(frag);
~~~~~~~~~~

packages/util/src/index.ts:110:38 - error TS2554: Expected 0 arguments, but got 2.

110 const sel = new WrappedSelection(nativeSel, window)
~~~~~~~~~~~~~~~~~

error TS6053: File '/home/mikob/scratchspace/rangy/packages/test-util/tsconfig.json' not found.

</p>
</details>

2. Can't get the createClassApplier to work. I don't see this in the build, but it's in the src.

Copy link

@abohomol abohomol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants