Comments (7)
I did a quick comparison between klap
, microbundle
and tsdx
. Here are notable differences:
👼 Comparison with microbundle
and tsdx
Feature | klap | microbundle | tsdx |
---|---|---|---|
Typescript Support | ✅ | ✅ | ✅ |
No Dependencies | ✅ | ❌ | ❌ |
Scaffolding | ✅ | ❌ | ✅ |
Dev Server | ✅ | ❌ | ❌ |
CSS | ❌ | ✅ | ✅ |
CSS Modules | ❌ | ✅ | ❌ |
Build Constants | ❌ | ✅ | ✅ |
Testing/Linting | ❌ | ❌ | ✅ |
We should probably start supporting build constants and some variation of CSS (maybe using postcss
).
The testing/linting setup is not a primary goal for klap
and we can skip it.
from klap.
For me, personally
- cleaner and more organized codebase
- zero deps
- different set of default babel and rollup plugins
- microbundle supports Buble
from klap.
Let's add comparison section in readme. I'll keep this open in case someone gets there before me.
from klap.
@tunnckoCore it seems microbundle
moved away from buble
. Am I missing something?
from klap.
Build constants are essentially constant variables that are pre-defined. Similar to process.env.NODE_ENV, but more granular.
For example, you can define a constant called DEBUG = true
and use DEBUG in your library code when developing, maybe like this:
if(DEBUG){
console.log('this was never supposed to happen')
}
Then you just run the build for distribution with DEBUG = false
and all your code within the if block get's removed.
Another use case is when you want to create multiple versions of your library with certain features on/off based on a defined build constant.
from klap.
Exactly. TSDX does this. Dev expressions, node_env and etc, also uses the replace plugin, so.. probably possible to customize further.
from klap.
Yup, true, they kind of moved to a hybrid approach as I remember.
Agree.
Build Constants
What do you mean with that? TSDX supports transforming such things, I think. :)
from klap.
Related Issues (20)
- Klap can't find typescript on init HOT 11
- Custom babel config HOT 4
- Have an option to remove index.js from public directory HOT 6
- Unexpected token HOT 5
- Programmable API HOT 1
- Unhandled child_process exception: init.js HOT 1
- klap adds LICENSE even if LICENSE.md exists HOT 7
- Build development environment? HOT 2
- Make prettier config optional HOT 2
- Question: ncc vs rollup HOT 9
- Enable support for the experimental syntax 'importAssertions' HOT 3
- No way to override the options that are set by "defaultOptions" HOT 1
- Bundle async function expression used as an IIFE HOT 3
- Bundle and minify es6 modules breaks the named exports HOT 6
- Dynamic imports generates error HOT 1
- Let the user add more Rollup plugins and configure them differently HOT 6
- Support Dev Expressions HOT 1
- Strange import behaviour on importing external dependency HOT 4
- Bundle external dependency instead of treating it as external HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from klap.