Skip to content

Add main field in package.json & expose CSS via style field #5

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

Merged
merged 2 commits into from
Jan 13, 2016

Conversation

prayagverma
Copy link
Contributor

As stated in NPM documentation of main field

The main field is a module ID that is the primary entry point to your program. That is, if your package is named foo, and a user installs it, and then does require("foo"), then your main module's exports object will be returned.

This would work well when adding browserify support

Also many modules are starting to expose their css entry files in their package.json files via the style field . This allows tools like npm-css, rework-npm, and npm-less to import angular-time-picker CSS from the node_modules directory. Also this plays well with browserify plugins (like parcelify) which helps in bundling CSS together from npm packages

@softvar
Copy link
Member

softvar commented Jan 13, 2016

Nice @pra85

softvar added a commit that referenced this pull request Jan 13, 2016
Add main field in package.json & expose CSS via style field
@softvar softvar merged commit 9290ca7 into wingify:master Jan 13, 2016
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.

2 participants