node.js - "style" field in package.json -
i noticed bootstrap , normalize.css both have "style" field in package.json.
why have this? if had guess, it's allow users import defined stylesheet doing require('bootstrap')
, doesn't seem case.
from techwraith's pull request added bootstrap:
many modules in npm starting expose css entry files in package.json files. allows tools
npm-css
,rework-npm
, ,npm-less
import bootstrap node_modules directory. [...]it's not written anywhere in code these modules right now. we're hoping standardized @ point, we've reached convention separately, i'm inclined go it. [...]
if want read style of css development, wrote thing:
http://techwraith.com/your-css-needs-a-dependency-graph-too/
there's support in other tools, such browserify plugin parcelify:
add css npm modules consumed browserify.
- just add style key package.json specify package's css file(s). [...]
parcelify concatenate css files in modules on
main.js
depends -- in casemymodule.css
-- in order of js dependency graph, , write outputbundle.css
.
Comments
Post a Comment