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]
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