Couple of comments:
1) Why do you need heavy CRA to publish just a component?
2) “publish:npm” script is not cross-platform, so you are able to run it on Mac, but on Windows it won’t work. It’s not so good for cross-platform teams. So it would be better to use “cross-env” for instance.
Thank you for leaving you feedback.
Answer 1) The intention of this article was to introduce simplest way to publish in npm. Thus I thought about showing how to publish a component from CRA as most of the beginners knows their way around CRA. I will try to write a new post next week on how to do it other way without creating a SPA.
Answer 2) I agree. I will update the post ASAP.
Thank you again.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Couple of comments:
1) Why do you need heavy CRA to publish just a component?
2) “publish:npm” script is not cross-platform, so you are able to run it on Mac, but on Windows it won’t work. It’s not so good for cross-platform teams. So it would be better to use “cross-env” for instance.
Thank you for leaving you feedback.
Answer 1) The intention of this article was to introduce simplest way to publish in npm. Thus I thought about showing how to publish a component from CRA as most of the beginners knows their way around CRA. I will try to write a new post next week on how to do it other way without creating a SPA.
Answer 2) I agree. I will update the post ASAP.
Thank you again.