cem-plugin-module-file-extensions
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

cem-plugin-readonly

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

Options

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

Option Type Default Description
from string | RegExp /\.(t|j)sx?$/ path replacement test
to string | 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"
          }
        }
      ]
    }
  ]
}

Package Sidebar

Install

npm i cem-plugin-module-file-extensions

Weekly Downloads

2,898

Version

0.0.5

License

MIT

Unpacked Size

3.22 kB

Total Files

4

Last publish

Collaborators

  • bennyp