0.0.5 • Published 2 years ago

cem-plugin-module-file-extensions v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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"
          }
        }
      ]
    }
  ]
}