Skip to content

Commit

Permalink
feat(npm): add experimental entrypoint (#3295)
Browse files Browse the repository at this point in the history
* feat(npm): add experimental entrypoint

* chore: add changeset

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
  • Loading branch information
joshblack and joshblack authored May 24, 2023
1 parent 5d06738 commit e71d928
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tiny-melons-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Add @primer/react/experimental entrypoint as an alternative to drafts
8 changes: 8 additions & 0 deletions experimental/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"_comment1": "this is required only for typescript. once this is fixed https://github.com/microsoft/TypeScript/issues/33079 we can remove this hack",
"name": "@primer/react/experimental",
"types": "../lib-esm/experimental/index.d.ts",
"main": "../lib-esm/experimental/index.js",
"type": "module",
"sideEffects": false
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"import": "./lib-esm/index.js",
"require": "./lib/index.js"
},
"./experimental": {
"import": "./lib-esm/experimental/index.js",
"require": "./lib/experimental/index.js"
},
"./drafts": {
"import": "./lib-esm/drafts/index.js",
"require": "./lib/drafts/index.js"
Expand Down
3 changes: 3 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const input = new Set([
// "."
'src/index.ts',

// "./experimental"
'src/experimental/index.ts',

// "./drafts"
'src/drafts/index.ts',

Expand Down
1 change: 1 addition & 0 deletions src/experimental/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '../drafts'

0 comments on commit e71d928

Please sign in to comment.