inject-scss
Advanced tools
Comparing version 1.0.0 to 1.0.1
var fs = require('fs') | ||
/* | ||
Convert js vars into scss vars! | ||
usage: | ||
var path = path.join(__dirname, 'public/styles/_inject.scss') | ||
var vars = {CDN: '/path/to/cdn/'} | ||
// defaults to scss | ||
scssInjector(path, vars) | ||
// ...but support sass, too | ||
var path = path.join(__dirname, 'public/styles/_inject.sass') | ||
scssInjector(path, vars, 'sass') | ||
// Then, in your scss file... | ||
@import './_inject.scss' | ||
*/ | ||
module.exports = function(outputPath, vars, type){ | ||
@@ -25,0 +4,0 @@ |
{ | ||
"name": "inject-scss", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Node util for generating s*ss variables from js objects", | ||
@@ -5,0 +5,0 @@ "main": "inject-scss.js", |
# inject-scss | ||
Node util for generating s*ss variables from js objects | ||
[![npm version](https://badge.fury.io/js/inject-scss.svg)](https://badge.fury.io/js/inject-scss) | ||
`npm install --save inject-scss` | ||
```javascript | ||
var scssInjector = require('inject-scss') | ||
var path = require('path') | ||
@@ -20,2 +26,3 @@ var fs = require('fs') | ||
@import './_inject.scss' | ||
``` | ||
``` | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28
2822
7
1