Scroll to navigation

COMPILE-MODULES(1) User Commands COMPILE-MODULES(1)

NAME

compile-modules - Transpile ECMAScript 6 modules to ECMAScript 5

SYNOPSIS

compile-modules [--help] [--version] <command> [<args>]

COMMANDS

compile-modules help <command>

Display help for the given command.

compile-modules convert [-I <path>] [-o <path>] [-f <path|name>] [-r <path>] <path> [<path> ...]

Converts the given modules by changing import/export statements to an ES5 equivalent.

Check the given path for imported modules (usable multiple times)
File or directory to output converted files
Path to custom formatter, or name of a built-in formats
Path to custom resolver (usable multiple times)

FORMATS


'commonjs' to convert modules to files using CommonJS require and exports objets

'bundle' to concatenate modules into a single file

RESOLVERS

Resolvers resolve import paths to modules. The default resolver will search the include paths provided by `--include` arguments and the current working directory. To provide custom resolver logic, pass the path to your resolver module providing a `resolveModule` function or class with an instance method with this signature:

`resolveModule(importedPath:String, fromModule:?Module, container:Container): Module`.

compile-modules