scss-inline-imports

1.0.7 • Public • Published

SCSS Inline Imports Dependabot Status Build Status NPM version

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

Readme

Keywords

none

Package Sidebar

Install

npm i scss-inline-imports

Weekly Downloads

16

Version

1.0.7

License

BSD-3-Clause

Unpacked Size

9.46 kB

Total Files

14

Last publish

Collaborators

  • salesforce-ux