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

ship untranspiled source #992

Merged
merged 3 commits into from
May 2, 2018
Merged

ship untranspiled source #992

merged 3 commits into from
May 2, 2018

Conversation

pravdomil
Copy link
Contributor

see http://2ality.com/2017/06/pkg-esnext.html#package-authors

this PR enables ship untranspiled source of reactstrap installed from github via npm i reactstrap/reactstrap so that you can transpile to target you want

@TheSharpieOne
Copy link
Member

You need to also include the src directory in the files which get published to npm.

@pravdomil
Copy link
Contributor Author

yea, true, do not know how

@TheSharpieOne
Copy link
Member

add "src" to the package.json "files" array.

Also, I was reading the comment for that article you linked, the esnext and "raw" source has some issues as it assumes the raw source doesn't require special transforms or plugins to be parsed or compiled. I'm fine with making this change, but I don't know if that package.json esnext property is going to take off and as soon as there is an issue, I'll probably drop it (but probably keep shipping the raw; just removing the reference)

@pravdomil
Copy link
Contributor Author

pravdomil commented May 1, 2018

src folder added

the esnext and "raw" source has some issues as it assumes the raw source doesn't require special transforms or plugins to be parsed or compiled

they mean if you the package depends on some non-standard babel transform eg. something in stage-0 or custom babel plugin, then it will fail to compile since a developer himself handle babel configuration, I have check what reactstrap uses and it's only ES6 transform and transform-object-rest-spread which is now in stage-4 so that should be fine. Everything which is in stage-4 is considered as esnext. (btw: react is the case).

I'm fine with making this change, but I don't know if that package.json esnext property is going to take off and as soon as there is an issue, I'll probably drop it (but probably keep shipping the raw; just removing the reference)

agree, this is more like a proof of concept, I'm curious how it will work

@TheSharpieOne TheSharpieOne merged commit 9317572 into reactstrap:master May 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants