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

--scripts-version should accept tags #439

Closed
gaearon opened this issue Aug 14, 2016 · 7 comments
Closed

--scripts-version should accept tags #439

gaearon opened this issue Aug 14, 2016 · 7 comments

Comments

@gaearon
Copy link
Contributor

gaearon commented Aug 14, 2016

We should change global CLI to accept tag there. Right now it accepts package name. Maybe we could have two separate flags?

@vjeux
Copy link
Contributor

vjeux commented Aug 14, 2016

If you do --scripts-version @latest it should work, doesn't it?

@gaearon
Copy link
Contributor Author

gaearon commented Aug 14, 2016

Maybe (I didn't thought about using this syntax). I expected that I can replace version with tag and it will still work, but it doesn't (have to add @?). I think people used to npm want to treat them as interchangeable.

@vjeux
Copy link
Contributor

vjeux commented Aug 14, 2016

Actually I was wrong.

Logic is here: https://github.com/facebookincubator/create-react-app/blob/master/global-cli/index.js#L133

It checks if it is semver valid, which doesn't work with arbitrary tag names.

@fson
Copy link
Contributor

fson commented Aug 14, 2016

At the moment, if the value passed to --scripts-version is not a valid semver string, it's passed to npm install as is, so this already works:

create-react-app --scripts-version facebookincubator/create-react-app#v0.2.0 my-app

You can install from a tag, a tarball, or even a feature branch from a forked repo:

create-react-app --scripts-version fson/create-react-app#syntax-async-functions my-app

@gaearon
Copy link
Contributor Author

gaearon commented Aug 14, 2016

This would be a different setup though. We do some stuff as prepublish step (bundle dependencies). So we want it to work with npm tag, not GH tag.

@fson
Copy link
Contributor

fson commented Aug 14, 2016

@gaearon Ah, sorry somehow I assumed this was about git tags 😄

@gaearon
Copy link
Contributor Author

gaearon commented Sep 24, 2016

Don’t really care too much about it.

@gaearon gaearon closed this as completed Sep 24, 2016
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants