Closed adamhaile closed 5 years ago
Merging #7 into master will increase coverage by
2.44%
. The diff coverage is86.36%
.
@@ Coverage Diff @@
## master #7 +/- ##
==========================================
+ Coverage 71.22% 73.66% +2.44%
==========================================
Files 1 1
Lines 827 638 -189
Branches 124 94 -30
==========================================
- Hits 589 470 -119
+ Misses 238 168 -70
Impacted Files | Coverage Δ | |
---|---|---|
lib/kiwi.js | 73.66% <86.36%> (+2.44%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 8ca847f...967d7ea. Read the comment docs.
Docs and minified build now work.
Some notes:
Alternative: if you're uncomfortable/unfamiliar with rollup I could change the typescript config to output AMD modules, which can then follow your old strategy of concat and wrap with a UMD loader.
With these changes, the string replacements you had devised to get jsdoc2md to work no longer matched the output. Instead of updating them, I did some experimentation and figured out that jsdoc2md could handle a full es6 compilation just fine -- one where we leave class
statements as they are rather than having typescript down-compile them to es5 function
statements. Kiwi.md
is even arguably improved, in that class descriptions are now under the classes themselves rather than their constructors. IE 10 and 11 still don't support class
statements, so using this output alone would be a breaking change. Therefore, the build does a separate es6 compilation in tmp, then runs jsdoc2md on that.
With the string replacements and concat+wrap removed, there wasn't much left for grunt to do, so I removed it and replaced its tasks with direct calls to the utilities in package.json.
This ended up being a bigger set of changes than I initially anticipated. Very little code is changed in the core lib, but the build is different. If this is more than you're comfortable with, we can discuss intermediate strategies. Or you can just ditch the PR. It's your library :).
To disclose my interest here, I'm evaluating kiwi.js for use in my startup's product. I was attracted to it for speed, clean design and indicators of code quality (tests, docs, activity, etc). We definitely need Typescript typing support, which is why the existing package doesn't work for us (see issue #6). We prefer a modern build, as if we go with kiwi.js, I suspect we'll need to get to know its internals. We can run our own fork but if our changes are consistent with your direction for the library it makes sense for us to contribute upstream, as always with open source.
Hey man, this is great work, I will try to review and merge this shortly! Cheers, Hein
Hi, I've merged all your code, looks really good!
I just removed the es
folder from the git repo. It's still published in the NPM package, but I always want to prevent auto-generated code to be contained in the git repo.
Thanks so much for this PR, this paves the way for the future.
Cheers dude!
NOT READY FOR MERGE
This PR switches kiwi.js from the older Typescript namespace syntax to standard ES6 module syntax (import/export).
Advantages of ES6 modules include:
Rollup is added to combine kiwi.js's ES6 modules into a single UMD module.
Current status is that it builds and passes all tests. Minified and JSDoc assets haven't been updated yet.
To run the new build, run
npm run rollup
. Take a look and see if you're comfortable with the general approach. If you are, I'll replace the grunt build with the rollup one as well as add the steps to build kiwi.min.js and Kiwi.md.