{"_id":"vueify-insert-css","_rev":"3-6466c3656cf00e08d4f1bcab6f677e9b","name":"vueify-insert-css","description":"insert a string of css into the <head>","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"vueify-insert-css","version":"1.0.0","description":"insert a string of css into the <head>","main":"index.js","dependencies":{},"devDependencies":{"tape":"^2.13.3","computed-style":"~0.1.3"},"repository":{"type":"git","url":"git://github.com/substack/insert-css.git"},"testling":{"files":"test/*.js","browsers":["ie/6..latest","chrome/20..latest","firefox/10..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6"]},"homepage":"https://github.com/substack/insert-css","keywords":["css","insert","dom","browser","browserify"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","gitHead":"c365e204a4b2cadc5601ab995a0a01fd895bbaf8","bugs":{"url":"https://github.com/substack/insert-css/issues"},"_id":"vueify-insert-css@1.0.0","scripts":{},"_shasum":"57e5d791907e8c9d87ae6de099a2174bd0a7f990","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"yyx990803","email":"yyx990803@gmail.com"},"maintainers":[{"name":"yyx990803","email":"yyx990803@gmail.com"}],"dist":{"shasum":"57e5d791907e8c9d87ae6de099a2174bd0a7f990","tarball":"https://registry.npmjs.org/vueify-insert-css/-/vueify-insert-css-1.0.0.tgz","integrity":"sha512-Q+8YBifZsvUC0E9fJ18wxBgFOUm2IwnoxQ5rx9mp0lp8OSLfd/5nafUSzQCreWBN3x4CsGooHjsC6yWovcRy3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDo+6D9wjMU3Xnee9E9/vgBb45dOCSPnAlSuAeYxh5yjQIgZBeZjq72CmGrG6T3NA4Ankd+PZqC9st4cSgGfXPmhyM="}]}}},"readme":"# insert-css\n\ninsert a string of css into the `<head>`\n\n[![browser support](https://ci.testling.com/substack/insert-css.png)](https://ci.testling.com/substack/insert-css)\n\n# example\n\nsuppose we've got some css:\n\n``` css\nbody {\n    background-color: purple;\n    color: yellow;\n}\n```\n\nand we want to bundle that css into a js file so that we can write an entirely\nself-contained module:\n\n``` js\nvar fs = require('fs');\nvar insertCss = require('insert-css');\nvar css = fs.readFileSync(__dirname + '/style.css');\ninsertCss(css);\ndocument.body.appendChild(document.createTextNode('HELLO CRUEL WORLD'));\n```\n\noptionally prepend the css to the head with the `prepend` option:\n\n``` js\ninsertCss(css, { prepend: true });\n```\n\ncompile with [browserify](http://browserify.org) using\n[brfs](https://github.com/substack/brfs) to inline the `fs.readFile()`\ncall:\n\n```\n$ browserify -t brfs insert.js > bundle.js\n```\n\nNow plop that bundle.js into a script tag and you'll have a self-contained js\nblob with inline css!\n\n``` html\n<html>\n  <head></head>\n  <body>\n    <script src=\"bundle.js\"></script>\n  </body>\n</html>\n```\n","maintainers":[{"name":"yyx990803","email":"yyx990803@gmail.com"}],"time":{"modified":"2022-06-28T20:54:55.505Z","created":"2015-10-23T20:12:26.993Z","1.0.0":"2015-10-23T20:12:26.993Z"},"homepage":"https://github.com/substack/insert-css","keywords":["css","insert","dom","browser","browserify"],"repository":{"type":"git","url":"git://github.com/substack/insert-css.git"},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"bugs":{"url":"https://github.com/substack/insert-css/issues"},"license":"MIT","readmeFilename":"readme.markdown"}