ababel

2019-06-24 admin

ababel是什么

什么是ababel,Compile with babel only when file changed from last time.

ababel使用教程帮助文档

ababel

<a name=“user-content-badges”></a>

Build Status npm Version JS Standard

<a name=“user-content-description”></a>

Compile with babel only when file changed from last time.

<a name=“user-content-overview”></a>

<a name=“user-content-sections”></a>

<a name=“user-content-section-doc-guides-01-installation-md”></a>

Installation

$ npm install ababel --save

<a name=“user-content-section-doc-guides-02-usage-md”></a>

Usage

'use strict'

const ababel = require('ababel')

void async function () {
  await ababel('**/*.jsx', {
    cwd: 'src',
    out: 'dest',
    minified: true,
    presets: ['es2015', 'react']
  })
}().catch((err) => console.error(err))

<a name=“user-content-section-doc-guides-03-signature-md”></a>

Signature

ababel(pattern, options) -> Promise

Params

Name Type Description
pattern string Glob file name pattern
options Object Optional settings
options.cwd string Current working directory path
options.out string Output directory path
options.minified boolean Minified or not
options.reflects string[] File patterns to reflects changes

<a name=“user-content-license”></a>

License

This software is released under the MIT License.

<a name=“user-content-links”></a>

Links

你可能感兴趣的文章:

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-68025.html

文章标题:ababel

回到顶部