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

Main should be a place for libraries, not sources #46

Closed
wants to merge 4 commits into from

Conversation

alber70g
Copy link

The main should contain files that can be used as library, not as sources. They can also contain the sources in forms of less, sass, or even d.ts files, so that the consuming party can choose based on filetype what to use and include in the project. Arguably even .min.js can also be added as it's the 'definitive' version of a 'compiled' library.

See also twbs/bootstrap compliance to the spec issues: twbs/bootstrap#16663

The main should contain files that can be used as library, not as sources. They can also contain the sources in forms of `less`, `sass`, or even `d.ts` files, so that the consuming party can choose based on filetype what to use and include in the project. Arguably even `.min.js` can also be added as it's the 'definitive' version of a 'compiled' library.

See also twbs/bootstrap compliance to the spec issues: twbs/bootstrap#16663
@HeroBart
Copy link

+1, please accept this pull request, I don't feel like compiling all the external libraries myself every time.

@desandro
Copy link
Member

Thanks for this contribution. We have resolve that main is for entry-point source files, not for distribution files. To resolve the Bootstrap issue, I've proposed a new files field. See #47.

We'll have to pass on the PR, but your efforts are appreciated.

@desandro desandro closed this Jun 22, 2015
@sheerun sheerun reopened this Jun 23, 2015
@sheerun
Copy link
Contributor

sheerun commented Jun 23, 2015

I think files doesn't solve it, because it lists all files, not main entry-points. I think we should accept this pull request and ask bootstrap to add compiled .css files again to main (they are different filetype than .scss, and they are "library endpoint", as they can be linked in html file, or required in other way).

That said files would be useful for libraries without main entry-points, like CSS libraries. Or for packages with optional files, like translations.

Added that the 'main' is not **only** for the compiled version, but also for the versions that can be used as libraries in case of `less`, `sass`, and maybe even `ts` files.
@@ -47,7 +47,7 @@ The package's semantic version number.
*Recommended*
Type: `String` or `Array` of `String`

The entry-point files necessary to use your package. Only one file per filetype.
The entry-point files necessary to use your package. Only one file per filetype. The files that are offered should be representing your package as library. This means that the files can be used without compiling for use by the consuming party. This is not limited to **only** the 'compiled' version. In case of `.less`, `.scss` or `(d).ts` etc. they can be used as library aswell when used in the consuming party source.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"as well"

@cvrebert
Copy link
Contributor

I don't think saying "as a library" offers any clarification. If anything, it makes me think of stuff like a library of Less/Sass mixins that the user would then import and use in their own Less/Sass file, which is in the opposite direction of what you're actually intending to propose.

@alber70g alber70g closed this Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants