All Projects → mpx-ecology → mpx-es-check

mpx-ecology / mpx-es-check

Licence: Apache-2.0 license
Checks the version of ES in JavaScript files with simple shell commands

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to mpx-es-check

dirname-filename-esm
__dirname and __filename for ES Modules environment
Stars: ✭ 57 (+280%)
Mutual labels:  commonjs, compatibility
ExpandedCollectionBundle
Symfony bundle for render entity collections as a selectable expanded list.
Stars: ✭ 13 (-13.33%)
Mutual labels:  bundle
lexik-jose-bridge
An Encoder for the LexikJWTAuthenticationBundle that uses web-token/jwt-framework
Stars: ✭ 27 (+80%)
Mutual labels:  bundle
VreshTwilioBundle
A Symfony2 wrapper for the official SDK provided by Twilio.
Stars: ✭ 45 (+200%)
Mutual labels:  bundle
bundlemon
Monitor your bundle size
Stars: ✭ 53 (+253.33%)
Mutual labels:  bundle
array-sort-by
Powerful mechanism to sort arrays or array of objects by one or more properties. You can also specify a custom comparer function.
Stars: ✭ 37 (+146.67%)
Mutual labels:  commonjs
titaniumifier
Get a Titanium™ SDK CommonJS module out of a Node package!
Stars: ✭ 95 (+533.33%)
Mutual labels:  commonjs
npm-es-modules
Breakdown of 7 different ways to use ES modules with npm today.
Stars: ✭ 67 (+346.67%)
Mutual labels:  commonjs
node-compat-require
Easily allow your Node program to run in a target node version range to maximize compatibility.
Stars: ✭ 22 (+46.67%)
Mutual labels:  compatibility
KtwDatabaseMenuBundle
Symfony bundle for extending KnpMenu to store menu items in a database.
Stars: ✭ 12 (-20%)
Mutual labels:  bundle
the-super-tiny-web-module-resolver
simple js bundler written in 100 lines of code.
Stars: ✭ 25 (+66.67%)
Mutual labels:  commonjs
go-astilectron-bundler
Bundle your Astilectron app with ease
Stars: ✭ 117 (+680%)
Mutual labels:  bundle
SonataAdminSearchBundle
[Abandoned] Implement Search Engine (ElasticSearch) inside Sonata Admin
Stars: ✭ 19 (+26.67%)
Mutual labels:  bundle
FCMBundle
A Bundle for Symfony projects to send notifications in mobile devices through Firebase Cloud Messaging API
Stars: ✭ 43 (+186.67%)
Mutual labels:  bundle
BaseBundle
Base for your Symfony bundles.
Stars: ✭ 28 (+86.67%)
Mutual labels:  bundle
guzzle6-bundle
Integrates Guzzle 6 into your Symfony application
Stars: ✭ 11 (-26.67%)
Mutual labels:  bundle
parcl
Gradle plugin for bundling your Java application for distribution on Windows, Mac and Linux
Stars: ✭ 52 (+246.67%)
Mutual labels:  bundle
retidy
Extract, unminify, and beautify ("retidy") each file from a webpack/parcel bundle (JavaScript reverse engineering)
Stars: ✭ 27 (+80%)
Mutual labels:  bundle
ParamConverterBundle
This bundle provides additional param converters for Symfony.
Stars: ✭ 16 (+6.67%)
Mutual labels:  bundle
macpack
Makes a macOS binary redistributable by searching the dependency tree and copying/patching non-system libraries.
Stars: ✭ 20 (+33.33%)
Mutual labels:  bundle

Mpx-es-check

项目构建产物兼容性检测,避免出现 babel 漏转或者是未经 babel 转码,造成因浏览器语法兼容问题的出错。

install

npm i @mpxjs/es-check --save-dev
// or
npm i @mpxjs/es-check -g

Usage

  • 如果是本地安装:在 package.json 中添加 scripts 命令
"esCheck": "mpx-es-check --module --ecma=6 './dist/*.js'"
  • 如果是全局安装:可直接运行命令
mpx-es-check --module --ecma=6 ./dist/*.js
  • --module 表示以 esModule 模块检测代码,如果不设置则表示使用 script 方式检测代码
  • --ecma 语法规则
    • ecma后表示要检测的最低版本的语法,可以是 (6/ 7/ 8/ 9/ 10/ 11/ 12) 或者是 (2015/ 2016/ 2017/ 2018/ 2019/ 2020/ 2021)
  • ./dist/*.js 检测文件
    • 设置文件匹配的范围,使用 glob pattern 配置的方式, somePath/*.js
    • 在 脚本中使用时需要加 '' 包裹,避免无法正确匹配文件
  • --all 检测实例方法和静态方法
    • --all 在命令中添加 --all 参数会启用实例方法和静态方法的检测
    mpx-es-check --module --ecma=6 --all ./dist/*.js

结果输出

检测中如果有高版本语法, 则会在终端提示,并将检测结果输出到项目 ./dist/es-check.log 文件中, 如果没有 dist 文件夹,则会在项目根目录输出 log 文件

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].