ngx-quill-editor icon indicating copy to clipboard operation
ngx-quill-editor copied to clipboard

Where is the index.js

Open tonychangcheng opened this issue 8 years ago • 10 comments

Hi,

I am using Angular-seed project which is using SystemJS. It requires the index.js instead of index.ts. Any ideas?

为什么没有index.js文件呢?

tonychangcheng avatar Jan 04 '17 04:01 tonychangcheng

不太明白...

surmon-china avatar Jan 04 '17 06:01 surmon-china

Can you compile all the .ts files to .js files? And that is what other libs have been done. As SystemJS is requiring .js files by default.

Thanks. Cheng

tonychangcheng avatar Jan 04 '17 08:01 tonychangcheng

Hi,

The ng2-ckeditor is doing the same thing - wrapping the ckeditor. And I could get it working with my Angular-seed project. Can you have a look at how tsconfig.json is woking in that project.

Thanks Cheng

tonychangcheng avatar Jan 05 '17 22:01 tonychangcheng

@tonychangcheng The operation of export * from './quillEditor.module'; in index.ts just export QuillEditorModule to any other module. So the index.ts is just the wrapper for importing QuillEditorModule. In other words, import { QuillEditorModule } from './index' is equal to import { QuillEditorModule } from './quillEditor.module'. So this index.ts file is not your angular2 project entry. Hoping this helps.

dusthub avatar Jan 07 '17 07:01 dusthub

Thanks for the response. My issue is that Angular-seed is by default loading .js files. And I could not change this setting as it would cause other problems. Which means, instead of loading .ts files SystemJS will require .ts.js files and of course will fail. I will raise a issue in the Angular-seed as well.

tonychangcheng avatar Jan 08 '17 23:01 tonychangcheng

@tonychangcheng .ts file means TypeScript file. So you need to compile .ts to .js file by TypeScript compiler first. Hoping this helps.

dusthub avatar Jan 09 '17 01:01 dusthub

I just created a issue in Angular-seed project and the author claimed that a Javascript bundle is better practice for production. The issue is here https://github.com/mgechev/angular-seed/issues/1753

tonychangcheng avatar Jan 09 '17 02:01 tonychangcheng

@tonychangcheng Hi, in fact I do not know how to build the index.js file you need, do you have any better suggestions?

surmon-china avatar Mar 20 '17 13:03 surmon-china

The other project ngx-quill has fixed the same issue. Maybe you can have a look. https://github.com/KillerCodeMonkey/ngx-quill/issues/4

tonychangcheng avatar Mar 21 '17 00:03 tonychangcheng

Ngx-Quill seems to be the better choice for an Angular Implementation of Quill

markgoho avatar Mar 29 '17 17:03 markgoho