-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Migrate remaining files to TypeScript #3631
Conversation
c10c292
to
b6f3864
Compare
78f5e99
to
0fbc62a
Compare
af028d1
to
cfc0ccb
Compare
@@ -13,6 +13,9 @@ import Clipboard from './modules/clipboard'; | |||
import History from './modules/history'; | |||
import Keyboard from './modules/keyboard'; | |||
import Uploader from './modules/uploader'; | |||
import Delta, { Op, OpIterator, AttributeMap } from 'quill-delta'; | |||
|
|||
export { Delta, Op, OpIterator, AttributeMap }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Export quill-delta so users don't need to install quill-delta on their side. This is useful to prevent multiple versions of quill-delta coexist in a project and Delta.registerEmbed()
being called on a wrong Delta instance.
An alternative is to get Delta
from Quill.import('delta')
but due to a TypeScript limit, users have to use typeof Delta
instead of Delta
when referring the type.
"lint": "npm run lint:eslint && npm run lint:tsc", | ||
"lint:eslint": "eslint .", | ||
"lint:tsc": "tsc --noEmit --skipLibCheck", | ||
"prepare": "npm run build", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When Quill is installed as a git dependency, the prepare
script will be called by npm to build js files. It won't be called when it's installed as a normal npm package where files have already been built before publishing.
689625f
to
14d92da
Compare
To test:
Run
npm pack
, make sure the bundle only contains necessary files.