Socket
Book a DemoInstallSign in
Socket

marduk

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marduk

Make babel usable with convention over configuration

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

marduk

npm install marduk -g

marduk is an attempt to make working with babel.js easier through providing sane configuration for a new or existing project.

marduk employs babel-presets-es2015 as the target transpilation for both es6 and es7

Commands

> marduk --help                                                                             !5015

  Usage: marduk [options] [command]


  Commands:

    setup|init [dir]            quick initialize a babel project in [dir] (current directory will be used if not passed)
    settings                    list your settings
    settings:set <key> <value>  change a setting
    settings:unset <key>        delete a setting

  Options:

    -h, --help     output usage information
    -V, --version  output the version number

ES6 [default]

es6 is the default standard for marduk upon installation.

It will create a project structure like:

> tree .  
|-project
  ├── es6 [es6 source files]
  │   ├── index.js
  │   └── README.md
  ├── lib [compiled assets]
  │   └── index.js
  └── package.json
  └── .babelrc

ES7

You can choose to use the es7 by setting your default via:

marduk settings:set standard es7

In es7 mode the project structure that marduk generates looks like this:

> tree .  
|-project
  ├── es7 [es7 source files]
  │   ├── index.js
  │   └── README.md
  ├── lib [compiled assets]
  │   └── index.js
  └── package.json
  └── .babelrc
  

Patching

marduk will also patch your package.json with:

  • necessary devDependencies

  • necessary dependencies

  • scripts (compile, watch, test, test-watch, preversion)

  • config (for the $in and $out dirs to compile from and to)

The exact preconfigurations for a patch can be found here

Patched Scripts

All tests are mocha driven and able to be written in es6/es7.

test-watch command patches in a mocha watcher with growl notifications

Notes

I do not use ES7 personally, but felt it important to attempt to support, and while I tested it with a few basic ES7 test examples locally and everything seemed fine, I am unsure of if I missed anything in regards to babel es7 best practices.

Sane reasons and discussions concerning the default configurations are appreciated.

Missing Features

[ ] local git-based configurations that people/organizations can share [ ] tests

Keywords

babel

FAQs

Package last updated on 01 Aug 2016

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