Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bem-transform/ts-computed-name

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bem-transform/ts-computed-name

Compute name of block and elem for BEM components.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@bem-transform/ts-computed-name

Compute name of block and elem for BEM components.

Requirement

typescript >= 2.9.0

Installation

npm i -D @bem-transform/ts-computed-name

Configuration

This transform correctly work with ts-loader and awesome-typescript-loader.

const { computeClassBemName } = require('@bem-transform/ts-computed-name')

Need add this transform into getCustomTransformers in before section.

{
  test: /\.tsx?$/,
  use: [
    {
      loader: require.resolve('awesome-typescript-loader'),
      options: {
        getCustomTransformers: () => ({
          before: [
            computeClassBemName(options),
          ],
        }),
      },
    },
},

Options

PropertyTypeDefaultDescription
availableClassParentstring[]['Block', 'Elem']Will add properties only to classes who have the parents from list.
availibleBemNamebooleantrueWill add the properties of block and elem based on the location in the fs.
availibleDisplayNamebooleantrueWill add the static property of displayName based on the location in the fs. (Recommended add only in development mode for debugging)
namingstring'origin'naming convention that uses at the project, should be origin or react.
overrideExistingPropertiesbooleantrueOverrides existing properties block, elem and displayName.

Keywords

FAQs

Package last updated on 10 Aug 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc