Skip to content

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

2 participants