Comments (17)
Perhaps we could skirt around having to commit dist/
to git by simply linking to the unpkg.com
release in each tag/release?
from mitt.
A developer comes across the repository and wants to test the library without having to install 42MB of dependencies ?
from mitt.
I totally agree that built assets should be included in the release zip. As for in the repo, are there many other projects that include the built assets in the repository? That feels like an anti-pattern to me, but I'm just one random developer π
from mitt.
A dist folder would make life a lot easier for many people.
from mitt.
I'm fine if someone wants to, though I'm actually not sure how useful it would be to load this library over a CDN. It's not a UMD module by default (though there is a .umd.js
version in dist/
..) so loading it via requirejs or similar would be quite painful. For me, I see no difference between referencing unpkg.com/mitt
/ unpkg.com/mitt/dist/mitt.umd.js
or JSDelivr's URL, except that unpkg.com
is completely automated on top of npm (requires no extra work, respects semver).
from mitt.
It's a personal preference regarding the repo :)
Any or both of the solutions would be much better than nothing :P
from mitt.
I never include dist files in Git. I don't mind trying to force-add them for the tags, as long as it's not too much work. This is an npm module, so you can always access them using npm's tarball URL (seen here) or unpkg.com/mitt/.
from mitt.
Hmm, the reason I brought this up is https://github.com/developit/mitt/releases
Sure, I can have it as a dep, but this could be handy too.
from mitt.
Agreed! I think I can force-add them in the release script.
from mitt.
Is that even possible? To have the dist files in tag.
from mitt.
not in a nice way
from mitt.
So the only solution is committing the dist files and updating them with every release. Personally, I'm not aware of another solution.
from mitt.
Ah, if that's the only way then I don't think it's worth it. Just like I don't publish anything to bower, I don't really want people relying on Github to install things.
from mitt.
Do you have a concrete use-case I can understand?
from mitt.
Installing this library doesn't require any other dependencies. There are only devDependencies
, which are not installed when running npm install mitt
. The entire source is already in the npm package, you can see it here: https://unpkg.com/mitt/
from mitt.
π
I use Travis to publish distribution builds to GH releases (and also to publish to npm), which looks, for example, like this. Maybe thatβs something youβd want to have?
from mitt.
Mayber add the project to jsdelivr? https://github.com/jsdelivr/jsdelivr/blob/master/CONTRIBUTING.md
from mitt.
Related Issues (20)
- Nuxt3 issues ? HOT 2
- Persist events that not yet have a handler HOT 1
- Is it possible to use mitt across two different tabs? Or via an iframe? HOT 10
- [TypeScript] define events interface HOT 3
- Mitt - some problems HOT 1
- Typescript issue with `moduleResolution: NodeNext` HOT 1
- `dist/mitt.mjs` must not have a sourcemap HOT 5
- mitt extension
- Unpkg CDN Version is down HOT 1
- Using Ag-grid cell renderer with Mitt HOT 1
- Bug: type issue in [email protected]+ with esm HOT 2
- Could we have a minor update? HOT 1
- Doesn't work with typescript 5 moduleResolution set to bundler HOT 11
- vue3 options methods use mitt Invalid HOT 1
- why use sllice & map HOT 2
- Can't pass multiple arguments with emit HOT 2
- How to declare type of event parameter when listen for event HOT 1
- error TS2349: This expression is not callable when using "module": "NodeNext". HOT 5
- Uncaught TypeError: (0 , mitt__WEBPACK_IMPORTED_MODULE_5__.default)(...) is not a function
- Emit issue on Vue 3. HOT 1
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 mitt.