Skip to content

Commit

Permalink
chore: rename builder.io -> qwik.dev (#651)
Browse files Browse the repository at this point in the history
  • Loading branch information
gioboa authored Dec 19, 2024
1 parent e43df90 commit 89a4ee5
Show file tree
Hide file tree
Showing 80 changed files with 135 additions and 4,582 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ npm install
npm run dev
```

See the [distribution](https://partytown.builder.io/distribution) section about the various files created. Note that both the root directory, and the `tests` directory receive a copy of the build files, such as `tests/~partytown/partytown.js`.
See the [distribution](https://partytown.qwik.dev/distribution) section about the various files created. Note that both the root directory, and the `tests` directory receive a copy of the build files, such as `tests/~partytown/partytown.js`.

## Submitting Issues And Writing Tests

Expand All @@ -26,7 +26,7 @@ If the PR fixes the issue, then creating an [end-to-end test](#e2e-testing) woul

Additionally, Github issues is a place to explain a problem in detail, along with a reproduction case for maintainers. However, Github issues is not the best place to ask how-to questions since project contributors and maintainers don’t have the capacity to debug external websites and the many third-party scripts. Any issues opened asking that are not following these guidelines will be closed.

Please also see the [FAQ section](https://partytown.builder.io/faq) for more info
Please also see the [FAQ section](https://partytown.qwik.dev/faq) for more info

## Plugin Authors / Developers

Expand All @@ -42,7 +42,7 @@ The easiest way to verify is to create a small, standalone replica in our [integ

To get a sense of this, you can take a look at some examples in the `tests/integrations` folder like [Twitter](https://github.com/BuilderIO/partytown/tree/main/tests/integrations/twitter/index.html). Usually, creating a copy of one of these folders and modifying it for a new plugin is the easiest way to get these to setup.

If it works, great! Send us a PR and we'd love to merge it in and highlight it as a working integration on our [Common Services page](https://partytown.builder.io/common-services) . If for any reason it does not work, we would love to help you figure out why it might not be working and figure out a way forward.
If it works, great! Send us a PR and we'd love to merge it in and highlight it as a working integration on our [Common Services page](https://partytown.qwik.dev/common-services) . If for any reason it does not work, we would love to help you figure out why it might not be working and figure out a way forward.

## Manual Testing

Expand All @@ -68,7 +68,7 @@ npm test

The same pages found in `tests` are deployed to:

https://partytown.builder.io/
https://partytown.qwik.dev/

## Publishing

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
Partytown is a lazy-loaded library to help relocate resource intensive scripts into a [web worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API), and off of the [main thread](https://developer.mozilla.org/en-US/docs/Glossary/Main_thread). Its goal is to help speed up sites by dedicating the main thread to your code, and offloading third-party scripts to a web worker.

> Note: Partytown is still in beta and not guaranteed to work in every scenario. Please see our [FAQ](https://partytown.builder.io/faq) and [Trade-Off](https://partytown.builder.io/trade-offs) sections for more info.
> Note: Partytown is still in beta and not guaranteed to work in every scenario. Please see our [FAQ](https://partytown.qwik.dev/faq) and [Trade-Off](https://partytown.qwik.dev/trade-offs) sections for more info.
The philosophy is that the main thread should be dedicated to your code, and any scripts that are not required to be in the [critical path](https://developers.google.com/web/fundamentals/performance/critical-rendering-path) should be moved to a web worker. Main thread performance is, without question, more important than web worker thread performance.

- [Getting Started](https://partytown.builder.io/getting-started)
- [Integrations](https://partytown.builder.io/integrations)
- [Configuration](https://partytown.builder.io/configuration)
- [Getting Started](https://partytown.qwik.dev/getting-started)
- [Integrations](https://partytown.qwik.dev/integrations)
- [Configuration](https://partytown.qwik.dev/configuration)
- [Releases](https://github.com/BuilderIO/partytown/releases)
- [FAQs](https://partytown.builder.io/faq)
- [FAQs](https://partytown.qwik.dev/faq)

![Without Partytown and With Partytown: Your code and third-party code compete for main thread resources](https://user-images.githubusercontent.com/452425/152393346-6f721a4f-3f66-410a-8878-a2b49e24307f.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/_table-of-contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- [Magento 2](/magento2)
- [Next.js](/nextjs)
- [Nuxt](/nuxt)
- [Qwik](https://qwik.builder.io/docs/integrations/partytown/)
- [Qwik](https://qwik.dev/docs/integrations/partytown/)
- [React](/react)
- [Remix](/remix)
- [Shopify Hydrogen](/shopify-hydrogen)
Expand Down
8 changes: 4 additions & 4 deletions docs/angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ To setup Partytown in an Angular project take the following steps.
Run the command below to install the dependencies

```bash
npm install @builder.io/partytown
yarn add @builder.io/partytown
pnpm install @builder.io/partytown
npm install @qwik.dev/partytown
yarn add @qwik.dev/partytown
pnpm install @qwik.dev/partytown
```

Add the path to the Partytown JS files into the assets array in your `angular.json` file
Expand All @@ -30,7 +30,7 @@ Add the path to the Partytown JS files into the assets array in your `angular.js
"assets": [...,
{
"glob": "**/*",
"input": "node_modules/@builder.io/partytown/lib",
"input": "node_modules/@qwik.dev/partytown/lib",
"output": "/~partytown"
}
]
Expand Down
4 changes: 2 additions & 2 deletions docs/atomics.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Below is an example of setting the `crossorigin` attribute on an image:

You can test if a browser is capable of enabling Atomics by visiting these test pages which respond with the correct headers.

- [Test COEP "credentialless"](https://partytown.builder.io/tests/atomics/)
- [Test COEP "require-corp"](https://partytown.builder.io/tests/atomics/?coep=require-corp)
- [Test COEP "credentialless"](https://partytown.qwik.dev/tests/atomics/)
- [Test COEP "require-corp"](https://partytown.qwik.dev/tests/atomics/?coep=require-corp)

## Additional Resources

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Configuration
---

Partytown does not require a config for it to work, however a config can be set to change the defaults. At the lowest level, it's configured by setting the `window.partytown = {...}` object before the Partytown snippet script. However, higher-level integrations, such as the `<Partytown/>` component found in `@builder.io/partytown/react`, should provide utilities to make setting the config easier
Partytown does not require a config for it to work, however a config can be set to change the defaults. At the lowest level, it's configured by setting the `window.partytown = {...}` object before the Partytown snippet script. However, higher-level integrations, such as the `<Partytown/>` component found in `@qwik.dev/partytown/react`, should provide utilities to make setting the config easier

| Config | Description |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down
26 changes: 13 additions & 13 deletions docs/copy-library-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
title: Copy Library Files
---

The [@builder.io/partytown](https://www.npmjs.com/package/@builder.io/partytown) NPM package provides the static `lib` files that need to be served from your site. Since Partytown is using a service worker, these files must be served from the same origin as your site, and cannot be hosted from a CDN. Each site is different, and how the Partytown `lib` files are hosted depends on individual setup.
The [@qwik.dev/partytown](https://www.npmjs.com/package/@qwik.dev/partytown) NPM package provides the static `lib` files that need to be served from your site. Since Partytown is using a service worker, these files must be served from the same origin as your site, and cannot be hosted from a CDN. Each site is different, and how the Partytown `lib` files are hosted depends on individual setup.

The `/~partytown/` directory should serve the static files found within [@builder.io/partytown/lib](/distribution). The quickest way is to copy the `lib` directory into a public `/~partytown` directory within your static server. Another option would be to set up a copy task within the project's bundler, or create a build step.
The `/~partytown/` directory should serve the static files found within [@qwik.dev/partytown/lib](/distribution). The quickest way is to copy the `lib` directory into a public `/~partytown` directory within your static server. Another option would be to set up a copy task within the project's bundler, or create a build step.

You can also use the [lib config](/configuration) if your site must host these files from a directory other than the default `/~partytown/`. Please see the [integration guides](/integrations) for more info on copying library files.

Expand All @@ -29,11 +29,11 @@ This command can be used before a build script. Below is an example of copying t

## Copy Task API

The same code that the `partytown copylib` CLI task uses, is also exposed as an API and can be imported by any NodeJS script. Below is an example of importing the `@builder.io/partytown/utils` API and copying the lib files to the given directory. Both examples of an ESM import or CommonJS require should work.
The same code that the `partytown copylib` CLI task uses, is also exposed as an API and can be imported by any NodeJS script. Below is an example of importing the `@qwik.dev/partytown/utils` API and copying the lib files to the given directory. Both examples of an ESM import or CommonJS require should work.

```js
import { copyLibFiles } from '@builder.io/partytown/utils'; // ESM
// const { copyLibFiles } = require('@builder.io/partytown/utils'); // CommonJS
import { copyLibFiles } from '@qwik.dev/partytown/utils'; // ESM
// const { copyLibFiles } = require('@qwik.dev/partytown/utils'); // CommonJS

async function myBuildTask() {
await copyLibFiles('path/to/public/~partytown');
Expand All @@ -44,7 +44,7 @@ async function myBuildTask() {

> Available as of Partytown 0.3.6
Import the `partytownRollup` plugin from `@builder.io/partytown/utils` into your `rollup.config.js` config file. Next, add `partytownRollup(opts)` to the `plugins` [option](https://rollupjs.org/guide/en/#using-plugins).
Import the `partytownRollup` plugin from `@qwik.dev/partytown/utils` into your `rollup.config.js` config file. Next, add `partytownRollup(opts)` to the `plugins` [option](https://rollupjs.org/guide/en/#using-plugins).

The Rollup plugin will copy Partytown `lib` directory to the given destination, which must be an absolute file path. The copying will happen at the time of the `writeBundle()` hook.

Expand All @@ -53,7 +53,7 @@ Below is an example of using a [Rollup config](https://rollupjs.org/guide/en/#us
```js
// rollup.config.js
import path from 'path';
import { partytownRollup } from '@builder.io/partytown/utils';
import { partytownRollup } from '@qwik.dev/partytown/utils';

export default {
plugins: [
Expand All @@ -68,7 +68,7 @@ export default {

> Available as of Partytown 0.3.6
Import the `partytownVite` plugin from `@builder.io/partytown/utils` into your `vite.config.js` config file. Next, add `partytownVite(opts)` to the `plugins` [option](https://vitejs.dev/config/#plugins).
Import the `partytownVite` plugin from `@qwik.dev/partytown/utils` into your `vite.config.js` config file. Next, add `partytownVite(opts)` to the `plugins` [option](https://vitejs.dev/config/#plugins).

The Vite plugin will copy Partytown `lib` directory to the given destination, which must be an absolute file path. The copying will happen at the time of the `writeBundle()` hook. When in dev mode, the Partytown lib files will be served using the Vite Dev Server.

Expand All @@ -77,7 +77,7 @@ Below is an example of using a [Vite config](https://vitejs.dev/config/) to copy
```js
// vite.config.js
import path from 'path';
import { partytownVite } from '@builder.io/partytown/utils';
import { partytownVite } from '@qwik.dev/partytown/utils';

export default ({ command }) => ({
plugins: [
Expand All @@ -90,13 +90,13 @@ export default ({ command }) => ({

## Webpack

Below is an example of using [Webpack's copy plugin](https://webpack.js.org/plugins/copy-webpack-plugin/) to copy the source `lib` directory found in the [@builder.io/partytown](https://www.npmjs.com/package/@builder.io/partytown) package, to the `public/~partytown/` directory:
Below is an example of using [Webpack's copy plugin](https://webpack.js.org/plugins/copy-webpack-plugin/) to copy the source `lib` directory found in the [@qwik.dev/partytown](https://www.npmjs.com/package/@qwik.dev/partytown) package, to the `public/~partytown/` directory:

```js
// webpack.config.js
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const partytown = require('@builder.io/partytown/utils');
const partytown = require('@qwik.dev/partytown/utils');

module.exports = {
plugins: [
Expand All @@ -114,12 +114,12 @@ module.exports = {

## Laravel Mix

Below is an example of using [Mix's copy()](https://laravel-mix.com/docs/6.0/copying-files/) to copy the source `lib` directory found in the [@builder.io/partytown](https://www.npmjs.com/package/@builder.io/partytown) package, to the `public/~partytown/` directory:
Below is an example of using [Mix's copy()](https://laravel-mix.com/docs/6.0/copying-files/) to copy the source `lib` directory found in the [@qwik.dev/partytown](https://www.npmjs.com/package/@qwik.dev/partytown) package, to the `public/~partytown/` directory:

```js
// webpack.mix.js
const mix = require('laravel-mix');
const partytown = require('@builder.io/partytown/utils');
const partytown = require('@qwik.dev/partytown/utils');

mix.copy(partytown.libDirPath(), 'public/~partytown');
```
22 changes: 11 additions & 11 deletions docs/distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
title: Distribution
---

Partytown is distributed from [@builder.io/partytown](https://www.npmjs.com/package/@builder.io/partytown) using NPM. Within the distribution there are a few directories and submodules, each with their own purpose.
Partytown is distributed from [@qwik.dev/partytown](https://www.npmjs.com/package/@qwik.dev/partytown) using NPM. Within the distribution there are a few directories and submodules, each with their own purpose.

```bash
@builder.io/partytown/
@qwik.dev/partytown/
├── integration/
├── lib/
├── react/
├── services/
└── utils/
```

## `@builder.io/partytown/lib`
## `@qwik.dev/partytown/lib`

The `lib` directory contains the static files that should be hosted from the same [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) as the website. Hosting from the same origin is a requirement of the [service worker scope](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/scope). The `lib` static files are minified and meant for production use.

```bash
@builder.io/partytown/lib/
@qwik.dev/partytown/lib/
├── partytown-atomics.js
├── partytown-media.js
├── partytown-sw.js
Expand All @@ -36,7 +36,7 @@ The `lib/debug` directory has the same purpose as the `lib`, but instead will co
The `lib/debug` files are not meant to be used in production. See the [Partytown Configuration](/configuration) docs on how to enable debug mode.

```bash
@builder.io/partytown/lib/debug/
@qwik.dev/partytown/lib/debug/
├── partytown-atomics.js
├── partytown-media.js
├── partytown-sandbox-sw.js
Expand All @@ -46,7 +46,7 @@ The `lib/debug` files are not meant to be used in production. See the [Partytown
└── partytown.js
```

## `@builder.io/partytown/integration`
## `@qwik.dev/partytown/integration`

The `integration` submodule provides functions that can be used for integrations.

Expand All @@ -56,17 +56,17 @@ The `integration` submodule provides functions that can be used for integrations
| SCRIPT_TYPE | The value for the script type attribute: `text/partytown` |

```js
import { partytownSnippet } from '@builder.io/partytown/integration';
import { partytownSnippet } from '@qwik.dev/partytown/integration';

const snippetText = partytownSnippet();
```

## `@builder.io/partytown/react`
## `@qwik.dev/partytown/react`

The `react` submodule is where you'll find the React specific components, which is just a wrapper around the `partytown.js` snippet code. Please see the [React](/react) docs for more information.

```js
import { Partytown } from '@builder.io/partytown/react';
import { Partytown } from '@qwik.dev/partytown/react';

export function Head() {
return (
Expand All @@ -77,11 +77,11 @@ export function Head() {
}
```

## `@builder.io/partytown/services`
## `@qwik.dev/partytown/services`

The `services` submodule provides some of the commonly used [forward events](/forwarding-events), such as Google Tag Manager or Facebook Pixel. Please see the [Common Services](/common-services) docs for more information.

## `@builder.io/partytown/utils`
## `@qwik.dev/partytown/utils`

The `utils` submodule provides some convenience utilities, such as the the [Copy Task CLI and API](/copy-library-files).

Expand Down
2 changes: 1 addition & 1 deletion docs/facebook-pixel.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Facebook Pixel uses the [fbq()](https://www.facebook.com/business/help/402791146
## Example Config
```js
// https://partytown.builder.io/configuration
// https://partytown.qwik.dev/configuration
{
resolveUrl: function(url) {
if (url.hostname === "connect.facebook.net") {
Expand Down
12 changes: 6 additions & 6 deletions docs/gatsby.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ For additional information, please see [How to Add Google Analytics gtag to Gats
## Install

```bash
npm install @builder.io/partytown
yarn add @builder.io/partytown
pnpm install @builder.io/partytown
npm install @qwik.dev/partytown
yarn add @qwik.dev/partytown
pnpm install @qwik.dev/partytown
```

## Configure

The `<Partytown/>` component is imported from the `@builder.io/partytown/react` submodule. The [config properties](/configuration) are JSX props.
The `<Partytown/>` component is imported from the `@qwik.dev/partytown/react` submodule. The [config properties](/configuration) are JSX props.

The following is an example of including the `<Partytown/>` component in `gatsby-ssr.js`. Notice the `<Partytown/>` component is in `setHeadComponents`, and the example analytics script has the `type="text/partytown"` attribute.

```jsx
import React from 'react';
import { Partytown } from '@builder.io/partytown/react';
import { Partytown } from '@qwik.dev/partytown/react';

export const onRenderBody = ({ setHeadComponents, setPreBodyComponents }) => {
setHeadComponents([
Expand Down Expand Up @@ -64,7 +64,7 @@ Copy library files to `static/~partytown`. How the files are copied or served fr

```jsx
const path = require("path");
const { copyLibFiles } = require('@builder.io/partytown/utils');
const { copyLibFiles } = require('@qwik.dev/partytown/utils');

exports.onPreBuild = async () => {
await copyLibFiles(path.join(__dirname, "static", "~partytown"));
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ What's different from most web development libraries is that Partytown does _not
## Install NPM package

```
npm install @builder.io/partytown
npm install @qwik.dev/partytown
```

## Next Steps
Expand Down
4 changes: 2 additions & 2 deletions docs/html.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ While the `partytown.js` file _could_ be an external request, it's recommended t
</head>
```

One option to load the snippet is from the `partytownSnippet()` function, exported from the [@builder.io/partytown/integration](/distribution#builderiopartytownintegration) submodule.
One option to load the snippet is from the `partytownSnippet()` function, exported from the [@qwik.dev/partytown/integration](/distribution#builderiopartytownintegration) submodule.

```js
import { partytownSnippet } from '@builder.io/partytown/integration';
import { partytownSnippet } from '@qwik.dev/partytown/integration';

const snippetText = partytownSnippet();
```
Expand Down
Loading

0 comments on commit 89a4ee5

Please sign in to comment.