ocean-ds / ocean-web

Blu's Design System for Web

Home Page:https://ocean-ds.github.io/ocean-web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Publishing flat npm packages for easier import paths

eltongarbin opened this issue · comments

Is your feature request related to a problem? Please describe.
I'm always frustrated when I see that the "dist" is part of the import path. Look at the examples below:

  • import { Container } from '@useblu/ocean-components/dist/Grid';
  • import { Col } from '@useblu/ocean-components/dist/Grid';
  • import { Row } from '@useblu/ocean-components/dist/Grid';

This leaves the import path a bit large and is not very elegant.

Describe the solution you'd like
I'd like to omit the directory /dist of the import path.

Describe alternatives you've considered
Check how the famous libraries are doing.

@eltongarbin ,

This is my proposal for the fix but, as you mentioned in slack, we should also ask ourselves how this will be affected by the Lerna implementation.

#385

So I've been testing the deploy process...

publish the beta22 tag in npm: https://www.npmjs.com/package/@useblu/ocean-components/v/0.1.0-beta.22

with it, the problem is solved, I've tested in a project the import now is without the dist:

image

with types and everything:

image

in the installation folder the package looks like this:

image