scss-inline-imports
v1.0.7
Published
A library to inline SCSS @imports statements
Downloads
89
Readme
SCSS Inline Imports
Getting Started
const inlineImports = require('scss-inline-imports')
let { scss } = inlineImports('./index.scss')
// Options
inlineImports('./index.scss', {
// An array of paths that should be searched when locating an import
includePaths: [],
// Include comments above each inlined import
comments: false
})
// Extras
let { imports, importsFlattened } = inlineImports('./index.scss')
// imports
[
{
'path/to/entry': [
{
'path/to/first/import': [
{
'path/to/first/child/import': []
}
]
},
{
'path/to/second/import': [
{
'path/to/second/child/import': []
}
]
}
]
}
]
// importsFlattened
[
'path/to/first/child/import',
'path/to/child/import',
'path/to/second/child/import',
'path/to/second/import',
'path/to/entry'
]
Running tests
Clone the repository, then:
npm install
# requires node >= 6.0.0
npm test