Socket
Socket
Sign inDemoInstall

bemdecl-to-fs-loader

Package Overview
Dependencies
28
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bemdecl-to-fs-loader

bemdecl-to-fs-loader ====================


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

bemdecl-to-fs-loader

Webpack loader wrapper for bemdecl-to-fs.

Installation

$ npm i bemdecl-to-fs-loader

Usage

Loader accepts javascript data, like array or plain object, or raw module code as a string (module.exports = [...]).

module.exports = {
  /* entry, output */

  module: {
    loaders: [
      {
        test: /\.bemjson\.js$/i,
        loader: 'bemdecl-to-fs!bemjson',
      }
    ]
  },

  bem: {
    levels: [
      'libs/blocks'
    ],
    extensions: [
      'css'
    ],
  }
};

Note that you can provide extensions and levels arguments to the loader, so they will overwrite globals from the bem section. For example:

{
  test: /\.bemjson\.js$/i,
  loader: 'bemdecl-to-fs?extensions[]=css&levels[]=libs/blocks!bemjson',
}

Keywords

FAQs

Last updated on 14 Dec 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc