Coder Social home page Coder Social logo

nextcloud-libraries / nextcloud-event-bus Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 3.0 4.16 MB

A event bus to communicate between Nextcloud components https://npmjs.org/@nextcloud/event-bus

Home Page: https://nextcloud-libraries.github.io/nextcloud-event-bus/

License: Other

TypeScript 100.00%
eventbus events nextcloud-plugin

nextcloud-event-bus's People

Contributors

aaronactu avatar andyscherzinger avatar antreesy avatar christophwurst avatar dependabot-preview[bot] avatar dependabot[bot] avatar juliushaertl avatar nextcloud-bot avatar nickvergessen avatar rullzer avatar skjnldsv avatar susnux avatar vinicius73 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nextcloud-event-bus's Issues

Reduce bundle size?

I'm excited to move away from window.OC to the @ nextcloud packages in most cases and I recently added @nextcloud/auth to one of my Nextcloud apps. ๐Ÿค“ This package, in turn, requires @nextcloud/nextcloud-bus, which unfortunately, seems to have had a considerable effect on bundle size. Right now, it's 13.41 % of the whole app's bundle.

/node_modules/@nextcloud/event-bus/dist/index.es.js
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 13.41 % (113.459 KB)

I quickly looked through this repository and I can't see any apparent reason why the code transpiles to more than 100 KB, maybe it is the import of semver? Or maybe it is simply legacy browser-support? Any ideas on how to reduce the size? ๐Ÿ˜Š

If you bundle semver, please transpile it too

Currently semver breaks IE11.
So we need to manually add it to the transpile set of babel

Since we're transpiling here too, either we don't at all or we should transpile the dependencies that are problematic ๐Ÿค”

~/Docker/apps2/viewer% npm ls semver
viewer@1.4.0 /home/admin/Docker/apps2/viewer
โ”œโ”€โ”ฌ @nextcloud/auth@1.3.0
โ”‚ โ””โ”€โ”ฌ @nextcloud/event-bus@1.2.0
โ”‚   โ””โ”€โ”€ semver@7.3.2 

Thoughts?
cc @nickvergessen @ChristophWurst @juliushaertl @georgehrke

Please update package

Hello, please update the package on npmjs because it says unsupported engine when installing with npm.

[RFC] Global events naming convention

Intro

Welcome!

Since I find it quite awesome that we can use global events, I think we should aim for a nice convention.
Let's list an example of potential events we could see across Nextcloud... ๐Ÿค”

Thoughts

  • A file have been updated
  • An app have been enabled/disabled
  • A contact have been deleted
  • A file have been uploaded
  • A header menu have been opened
  • The sidebar have been toggled
  • ...

Goals

I think it would be nice to have some kind of modifier syntax.
I really dislike underscores, so I would favour dashes.

Proposal

  • files:file.update
  • contacts:contact.delete
  • nextcloud:app.disable
  • nextcloud:unified-search.search

Sub-proposal

I would love to be able to watch for partial event names.
Like file:update:12345 and file:update would both trigger if the file 13245 is updated?

Questions

  • Shall we enforce the dashes and throw errors
  • Shall we strongly suggest the syntax event:modifier:data (e.g. file:update:12345)
    • If so, the header-menu-unified-search:open should most likely be header-menu:open:unified-search ?

Thanks!
cc @georgehrke @korelstar @ma12-co @juliushaertl @ChristophWurst @raimund-schluessler @danxuliu @rullzer

Incorrect typing emitted on build

There should be a dist/index.d.ts but it's in dist/lib/index.d.ts for some reason.

Module work anyway, but IDE support is subpart.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.