Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using lux.js in private project #59

Open
petermartings1978 opened this issue Nov 20, 2024 · 5 comments
Open

Using lux.js in private project #59

petermartings1978 opened this issue Nov 20, 2024 · 5 comments

Comments

@petermartings1978
Copy link

Hi SpeedCurve

This is not a bug report, but just a question.

As I understand the LICENSE I am allowed to use your repo in my own project, as long as I keep the copyright statement intact.
Is that a correct understanding? And if so, where should that copyright statement be stated? Is it in the minified lux.js file I generate?

@josephwynn-sc
Copy link
Member

Hi there! This is not legal advice but the short version is: in most cases you don't need to worry about the license. Any code that you generate from this source code can be redistributed without the license.

The slightly longer version:

  • If you use the lux.js source code to generate some other code, you don't need to do anything special. This includes the lux.js and lux.min.js that you will get from running npm run build - these files are not in the source code, so you can redistribute them without worrying about the license.
  • If you redistribute the lux.js source code as source code e.g. the raw TypeScript files, then you must distribute the LICENSE file with it. In normal circumstances you don't need to worry about this, since the LICENSE file is part of the source code.

I hope that helps :)

@petermartings1978
Copy link
Author

@josephwynn-sc, thank you for the quick answer, that helped a lot!

While I have you, can you point me in the direction to where you make support for measuring LCP and CLS in Safari in the repo? I've tried to find ways to support this as Google's web-vitals package doesnt do that.

@josephwynn-sc
Copy link
Member

@petermartings1978 unfortunately it's not possible to measure any of the web vitals metrics in Safari. Those metrics require support from the browser itself and cannot be polyfilled. It's not even possible to approximate the values 😢

The WebKit engineering manager was actually asking for opinions about this the other day on BlueSky: https://bsky.app/profile/nicolesullivan.bsky.social/post/3lbduwl3xqc26

@petermartings1978
Copy link
Author

@josephwynn-sc, Oh okay. I thought speedcurve collected web vitals from Safari too. So its not collecting other metrics than Googles web-vitals?

Interesting thread!

@josephwynn-sc
Copy link
Member

@petermartings1978 web-vitals collects 6 metrics, each with different levels of browser support:

  1. Largest Contentful Paint (Chromium, Firefox)
  2. Cumulative Layout Shift (Chromium)
  3. Interaction to Next Paint (Chromium, Firefox)
  4. First Input Delay (Chromium, Firefox)
  5. First Contentful Paint (All browsers)
  6. Time to First Byte (All browsers)

The browser support is universal, so it doesn't matter which library you use to collect these metrics. lux.js collects these metrics plus dozens more. We have a metric glossary - any metric with "RUM next to it" is collected by lux.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants