🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

cube-babel

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cube-babel

cube babel processor

0.0.5
Source
npm
Version published
Weekly downloads
13
Maintainers
1
Weekly downloads
 
Created
Source

cube-babel

babel转换器, 配置的config参数,和babel一致,请参考babel-core的用法

usage:

{
    cube: {
        processors: {
            '.js': [
                [
                    'cube-babel', 
                    {
                        presets: [
                            'react',
                            [
                                'env', 
                                {
                                  "targets": {
                                    "browsers": [
                                        "chrome >= 50", 
                                        "safari >= 7"
                                    ]
                                  }
                                }
                            ]
                        ],
                        plugins: [
                            ['${plugin-name}', {/** ${config} **/}]
                        ]
                    }
                ]
            ]
        }
    }

更多配置,请参考babel文档 http://babeljs.io/docs/plugins/#official-presets

FAQs

Package last updated on 27 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts