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

Use unreleased numberfield component #13

Open
hupf opened this issue Nov 2, 2020 · 1 comment
Open

Use unreleased numberfield component #13

hupf opened this issue Nov 2, 2020 · 1 comment
Labels
question Further information is requested

Comments

@hupf
Copy link
Collaborator

hupf commented Nov 2, 2020

React Spectrum's numberfield component is not published as NPM package, but is available in the repository:
https://github.com/adobe/react-spectrum/tree/main/packages/%40react-spectrum/numberfield

It is currently "In Progress", targeted release in Q4: https://github.com/adobe/react-spectrum/projects/1#card-43152246

@hupf hupf changed the title Use unreleased number component Use unreleased numberfield component Nov 2, 2020
@hupf
Copy link
Collaborator Author

hupf commented Nov 2, 2020

With NPM, packages can be installed from Git repositories, although this doesn't work for sub directories (as usual with monorepos) and probably will never be supported: github.com/npm/npm/issues/2974

Same discussion is ongoing for Yarn: github.com/yarnpkg/yarn/issues/4725

One possibility would be to use https://github.com/ramasilveyra/gitpkg to push the unpublished package into an own repositories with a seperate tag, then reference this in our package.json.

Or reference the packages directly with https://gitpkg.now.sh in package.json, but I was not able to get this to work. It would look like this in the package.json:

"@react-spectrum/numberfield "gitpkg.now.sh/adobe/react-spectrum/packages/@react-spectrum/numberfield?main",
"@react-types/numberfield "gitpkg.now.sh/adobe/react-spectrum/packages/@react-types/numberfield?main",
"@react-stately/numberfield "gitpkg.now.sh/adobe/react-spectrum/packages/@react-stately/numberfield?main",

"@react-aria/numberfield "gitpkg.now.sh/adobe/react-spectrum/packages/@react-aria/numberfield?main",
"@react-aria/spinbutton "gitpkg.now.sh/adobe/react-spectrum/packages/@react-aria/spinbutton?main",
"@react-aria/live-announcer "gitpkg.now.sh/adobe/react-spectrum/packages/@react-aria/live-announcer?main",
"@adobe/spectrum-css-temp "gitpkg.now.sh/adobe/react-spectrum/packages/@adobe/spectrum-css-temp?main"

Or checkout the repository with the git command in a postinstall script and then use npm link to reference the package. But this is quite hacky.

Git submodules are another thing, but not easy to handle (for other developers cloning the repo and getting started with the development locally).

@mburri mburri added the question Further information is requested label Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants