insert-sass
a browserify transform for inserting sass
npm install insert-sass
example
body .foo
body .foo
const foo = // calling the function inserts css into <head> const el = documentelinnerHTML = "some text"elclassName = stylesfoo documentbody console // { foo: 'test-first_foo_2luu1' } // classname mapping console // css is inserted const otherStyles = // not applied yet console // { [Function: bound ] bar: 'test-second_bar_1geYD' } console // second.scss is not inserted yet // apply now console // second.scss is inserted