Migrate modules from amd to ES6 import/export #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, @pissang
这是一个很大很大的pull request, 可能会让你吓一跳, 非常不好意思 😹
这个PR的具体起因请参考mrdoob/three.js#9310
qtek采用amd来组织模块, 但目前ES6已成为事实的模块标准, 改用ES6模块的益处这里就不再赘述了.
qtek改用ES6模块后, 有几个很明显的好处:
打包时能直接导入essl, 无需再把essl转成js目前改造已经基本完成, 我对比了原qtek把tests跑了一遍, 暂时没有发现什么问题.
我做的修改:
import/export
dist中改为生成umd格式的qtek.js和ES模块格式的qtek.es.js最后, 因为变化很大, 这个PR谨供探讨, 即使不合并也没什么关系 😄 (当然很希望能起点作用)
Happy coding!