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

Expose fp-ts modules without lib/es6 prefix #1241

Merged
merged 107 commits into from
Jul 28, 2020
Merged

Expose fp-ts modules without lib/es6 prefix #1241

merged 107 commits into from
Jul 28, 2020

Conversation

StefanoMagrassi
Copy link
Contributor

@StefanoMagrassi StefanoMagrassi commented Jun 15, 2020

This PR allows importing fp-ts modules without specifing the /lib or /es6 prefix:

// from
import * as O from 'fp-ts/lib/Option'

// to
import * as O from 'fp-ts/Option'

Build tools will automatically resolve the right path based on the current environment, pointing to /lib version for commonjs and /es6 version for ES6.

For now the /lib and es6 paths are still available, so this feature is completely backward compatible.

This should enhance the library ergonomics and tree-shakeability.

Note: in order to achieve this goal, the standard npm publish command was disabled in favour of an npm run release command which builds the library and prepares the package for publication.

ref #1227 #1053

@waynevanson
Copy link
Contributor

I'm extremely eager for this! Great work.

@anilanar
Copy link
Contributor

@gcanti Is there something we can help to move this PR forward?

@gcanti gcanti added this to the 2.8 milestone Jul 24, 2020
@gcanti
Copy link
Owner

gcanti commented Jul 24, 2020

@anilanar planned for v2.8

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.

8 participants