zoukankan      html  css  js  c++  java
  • 使用Lebab 将 Javascript ES5 转 ES6

    导览

    0. 前提

    前提条件:

    a/, 必须安装 Node

    由于已经安装Node 只需要把Node 添加一个快捷方式到 /usr/local/bin/;
    (如果已经安装不知道在哪里时,使用which node命令)

    ln -s /usr/local/opt/node@12/bin/node /usr/local/bin/node

    b/, 必须安装 lebab

    npm install -g lebab

    1. 使用Sublime Text

    在 Package Control : install package 搜索 Lebab 并且安装。

    使用方法:

    • 右键> Lebab > Convert ES5 to ES6
    • 菜单栏 > Tools > Lebab > Convert ES5 to ES6

    2. 使用Command

    实现特定的转换

    lebab es5.js -o es6.js --transform let

    转换文件的整个目录

    # .js files only
    $ lebab --replace src/js/ --transform arrow
    # For other file extensions, use explicit globbing
    $ lebab --replace 'src/js/**/*.jsx' --transform arrow
    
  • 相关阅读:
    输入分隔符
    GO
    match|align|identify|cover_rate
    KEGG
    InterProScan
    Functional annotation
    GeneWise
    get middle lines
    goland debug web app with urfave cli
    go mod proxy
  • 原文地址:https://www.cnblogs.com/q1104460935/p/13045201.html
Copyright © 2011-2022 走看看