-
Notifications
You must be signed in to change notification settings - Fork 852
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove Babel and Parcel * Add the build script * Refine the build script * Also minify * Comments * Update .yarn/versions * Don't minify (#1316) * yarn types:check * Nit * Remove unused script * Do not require importing React into scope to use JSX in Storybook * Remove splitting and React from "external"
- Loading branch information
Showing
81 changed files
with
1,195 additions
and
2,770 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
releases: | ||
"@radix-ui/number": minor | ||
"@radix-ui/primitive": minor | ||
"@radix-ui/react-accessible-icon": minor | ||
"@radix-ui/react-accordion": minor | ||
"@radix-ui/react-alert-dialog": minor | ||
"@radix-ui/react-announce": minor | ||
"@radix-ui/react-arrow": minor | ||
"@radix-ui/react-aspect-ratio": minor | ||
"@radix-ui/react-avatar": minor | ||
"@radix-ui/react-checkbox": minor | ||
"@radix-ui/react-collapsible": minor | ||
"@radix-ui/react-collection": minor | ||
"@radix-ui/react-compose-refs": minor | ||
"@radix-ui/react-context": minor | ||
"@radix-ui/react-context-menu": minor | ||
"@radix-ui/react-dialog": minor | ||
"@radix-ui/react-direction": minor | ||
"@radix-ui/react-dismissable-layer": minor | ||
"@radix-ui/react-dropdown-menu": minor | ||
"@radix-ui/react-focus-guards": minor | ||
"@radix-ui/react-focus-scope": minor | ||
"@radix-ui/react-form": minor | ||
"@radix-ui/react-hover-card": minor | ||
"@radix-ui/react-id": minor | ||
"@radix-ui/react-label": minor | ||
"@radix-ui/react-menu": minor | ||
"@radix-ui/react-menubar": minor | ||
"@radix-ui/react-navigation-menu": minor | ||
"@radix-ui/react-popover": minor | ||
"@radix-ui/react-popper": minor | ||
"@radix-ui/react-portal": minor | ||
"@radix-ui/react-presence": minor | ||
"@radix-ui/react-primitive": minor | ||
"@radix-ui/react-progress": minor | ||
"@radix-ui/react-radio-group": minor | ||
"@radix-ui/react-roving-focus": minor | ||
"@radix-ui/react-scroll-area": minor | ||
"@radix-ui/react-select": minor | ||
"@radix-ui/react-separator": minor | ||
"@radix-ui/react-slider": minor | ||
"@radix-ui/react-slot": minor | ||
"@radix-ui/react-switch": minor | ||
"@radix-ui/react-tabs": minor | ||
"@radix-ui/react-toast": minor | ||
"@radix-ui/react-toggle": minor | ||
"@radix-ui/react-toggle-group": minor | ||
"@radix-ui/react-toolbar": minor | ||
"@radix-ui/react-tooltip": minor | ||
"@radix-ui/react-use-callback-ref": minor | ||
"@radix-ui/react-use-controllable-state": minor | ||
"@radix-ui/react-use-escape-keydown": minor | ||
"@radix-ui/react-use-layout-effect": minor | ||
"@radix-ui/react-use-previous": minor | ||
"@radix-ui/react-use-rect": minor | ||
"@radix-ui/react-use-size": minor | ||
"@radix-ui/react-visually-hidden": minor | ||
"@radix-ui/rect": minor | ||
|
||
declined: | ||
- primitives |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { globSync } from 'glob'; | ||
import * as esbuild from 'esbuild'; | ||
import * as tsup from 'tsup'; | ||
|
||
async function build(path) { | ||
const file = `${path}/src/index.ts`; | ||
const dist = `${path}/dist`; | ||
|
||
const esbuildConfig = { | ||
entryPoints: [file], | ||
external: ['@radix-ui/*'], | ||
packages: 'external', | ||
bundle: true, | ||
sourcemap: true, | ||
target: 'es2022', | ||
outdir: dist, | ||
}; | ||
|
||
await esbuild.build(esbuildConfig); | ||
console.log(`Built ${path}/dist/index.js`); | ||
|
||
await esbuild.build({ | ||
...esbuildConfig, | ||
format: 'esm', | ||
outExtension: { '.js': '.mjs' }, | ||
}); | ||
console.log(`Built ${path}/dist/index.mjs`); | ||
|
||
// tsup is used to emit d.ts files only (esbuild can't do that). | ||
// | ||
// Notes: | ||
// 1. Emitting d.ts files is super slow for whatever reason. | ||
// 2. It could have fully replaced esbuild (as it uses that internally), | ||
// but at the moment its esbuild version is somewhat outdated. | ||
// It’s also harder to configure and esbuild docs are more thorough. | ||
await tsup.build({ | ||
entry: [file], | ||
format: ['cjs', 'esm'], | ||
dts: { only: true }, | ||
outDir: dist, | ||
silent: true, | ||
external: [/@radix-ui\/.+/], | ||
}); | ||
console.log(`Built ${path}/dist/index.d.ts`); | ||
} | ||
|
||
globSync('packages/*/*').forEach(build); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.