🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

cem-plugin-module-file-extensions

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cem-plugin-module-file-extensions

Rewrite module path file extentions

latest
Source
npmnpm
Version
0.0.5
Version published
Weekly downloads
12K
29.81%
Maintainers
1
Weekly downloads
 
Created
Source

cem-plugin-readonly

Adds (non-standard) "readonly" flag to class fields

Options

from and to are the 1st and 2nd parameter to String#replace.

OptionTypeDefaultDescription
fromstring | RegExp/\.(t|j)sx?$/path replacement test
tostring | function'.js'replacer string or function

Example

custom-elements-manifest.config.js

import { moduleFileExtensionsPlugin } from 'cem-plugin-module-file-extensions';

export default {
  globs: '*.ts',
  plugins: [
    moduleFileExtensionsPlugin(),
  ]
}

Output

{
  "schemaVersion": "1.0.0",
  "readme": "",
  "modules": [
    {
      "kind": "javascript-module",
      "path": "my-element.js",
      "declarations": [
        {
          "kind": "class",
          "description": "",
          "name": "MyElement",
          "customElement": true
        }
      ],
      "exports": [
        {
          "kind": "js",
          "name": "MyElement",
          "declaration": {
            "name": "MyElement",
            "module": "my-element.js"
          }
        }
      ]
    }
  ]
}

Keywords

custom-elements-manifest

FAQs

Package last updated on 23 Mar 2022

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