# kbs-dsl-parser

> 将 es5 转成 KBS 的 DSL.

Latest version **1.1.9** (published 2024-10-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install kbs-dsl-parser
pnpm add kbs-dsl-parser
yarn add kbs-dsl-parser
bun add kbs-dsl-parser
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.9 |
| Published | 2024-10-04 |
| First published | 2023-09-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | leeenx |
| Maintainers | arhimli |

## Links

- npm: https://www.npmjs.com/package/kbs-dsl-parser
- Repository: https://github.com/leeenx/kbs-dsl-parser
- Homepage: https://github.com/leeenx/kbs-dsl-parser#readme
- Issues: https://github.com/leeenx/kbs-dsl-parser/issues
- npm.io page: https://npm.io/package/kbs-dsl-parser

## Recent versions

- 1.1.9 (latest) — 2024-10-04
- 1.1.8 — 2024-10-02
- 1.1.7 — 2024-09-29
- 1.1.6 — 2024-09-12
- 1.1.5 — 2024-09-11
- 1.1.4 — 2024-03-22
- 1.1.2 — 2023-12-14
- 1.1.1 — 2023-12-12
- 1.1.0 — 2023-12-11
- 1.0.15 — 2023-11-21
- 1.0.13 — 2023-10-26
- 1.0.12 — 2023-10-09
- 1.0.10 — 2023-10-09
- 1.0.9 — 2023-10-08
- 1.0.8 — 2023-10-08
- … 8 more at https://npm.io/package/kbs-dsl-parser/versions

## README

# kbs-dsl-parser

将 es5 转成 KBS DSL 的 webpack 插件。
用法如下：

```javascript
const KbsDslParserPlugin = require('kbs-dsl-parser');

// 保留函数名
const ignoreFNames = [
  '_applyDecoratedDescriptor',
  '_applyDecs',
  '_applyDecs2203',
  '_applyDecs2203R',
  '_applyDecs2301',
  '_applyDecs2305',
  '_arrayLikeToArray',
  '_arrayWithHoles',
  '_arrayWithoutHoles',
  '_assertThisInitialized',
  '_AsyncGenerator',
  '_asyncGeneratorDelegate',
  '_asyncIterator',
  '_asyncToGenerator',
  '_awaitAsyncGenerator',
  '_AwaitValue',
  '_checkInRHS',
  '_checkPrivateRedeclaration',
  '_classApplyDescriptorDestructureSet',
  '_classApplyDescriptorGet',
  '_classApplyDescriptorSet',
  '_classCallCheck',
  '_classCheckPrivateStaticAccess',
  '_classCheckPrivateStaticFieldDescriptor',
  '_classExtractFieldDescriptor',
  '_classNameTDZError',
  '_classPrivateFieldDestructureSet',
  '_classPrivateFieldGet',
  '_classPrivateFieldInitSpec',
  '_classPrivateFieldLooseBase',
  '_classPrivateFieldLooseKey',
  '_classPrivateFieldSet',
  '_classPrivateMethodGet',
  '_classPrivateMethodInitSpec',
  '_classPrivateMethodSet',
  '_classStaticPrivateFieldDestructureSet',
  '_classStaticPrivateFieldSpecGet',
  '_classStaticPrivateFieldSpecSet',
  '_classStaticPrivateMethodGet',
  '_classStaticPrivateMethodSet',
  '_construct',
  '_createClass',
  '_createForOfIteratorHelper',
  '_createForOfIteratorHelperLoose',
  '_createSuper',
  '_decorate',
  '_defaults',
  '_defineAccessor',
  '_defineEnumerableProperties',
  '_defineProperty',
  '_dispose',
  '_extends',
  '_get',
  '_getPrototypeOf',
  '_identity',
  '_inherits',
  '_inheritsLoose',
  '_initializerDefineProperty',
  '_initializerWarningHelper',
  '_instanceof',
  '_interopRequireDefault',
  '_interopRequireWildcard',
  '_isNativeFunction',
  '_isNativeReflectConstruct',
  '_iterableToArray',
  '_iterableToArrayLimit',
  '_iterableToArrayLimitLoose',
  '_jsx',
  '_maybeArrayLike',
  '_newArrowCheck',
  '_nonIterableRest',
  '_nonIterableSpread',
  '_objectDestructuringEmpty',
  '_objectSpread',
  '_objectSpread2',
  '_objectWithoutProperties',
  '_objectWithoutPropertiesLoose',
  '_OverloadYield',
  '_possibleConstructorReturn',
  '_readOnlyError',
  '_regeneratorRuntime',
  '_set',
  '_setPrototypeOf',
  '_skipFirstGeneratorNext',
  '_slicedToArray',
  '_slicedToArrayLoose',
  '_superPropBase',
  '_taggedTemplateLiteral',
  '_taggedTemplateLiteralLoose',
  '_tdz',
  '_temporalRef',
  '_temporalUndefined',
  '_toArray',
  '_toConsumableArray',
  '_toPrimitive',
  '_toPropertyKey',
  '_typeof',
  '_unsupportedIterableToArray',
  '_using',
  '_wrapAsyncGenerator',
  '_wrapNativeSuper',
  '_wrapRegExp',
  '_writeOnlyError',
];

module.exports = {
  ...,
  plugins: [
    new KbsDslParserPlugin({
      compress: process.env.COMPRESS === 'yes', // 是否压缩代码
      ignoreFNames, // 保留的函数名列表：默认为 @babel/runtime/helpers
      watch: true // 是否开启监听
      watchOptions: {
        protocol: 'ws', // 只有这个选项
        host: 'localhost', // 如果不想用 localhost 可以传值进去
        port: 9900 // 端口
      }
    })
  ]
}
```

---
_Source: https://npm.io/package/kbs-dsl-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
