Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.9 KB

getting-started.md

File metadata and controls

56 lines (42 loc) · 1.9 KB

Getting started

This is a step-by-step guide on how to get started with Esmbly.

1. Prerequisites

Esmbly is all about statically typed JavaScript so before you get started, make sure you have Node.js and npm installed.

2. Project setup

Navigate to the project where you want to run Esmbly. If the project does not contain a package.json, run npm init to create one.

cd my-project
npm init

3. Installation

The easiest way to install and configure Esmbly is to use npx. The init command will ask about which transformers you want to use, create a configuration file and (optionally) install any necessary dependencies.

npx @esmbly/cli init

Manual installation

Optionally, you could install @esmbly/cli yourself then use the init command to create a configuration file (or create one manually). Make sure to install the transformers you want to use as well.

# Using Yarn:
yarn add @esmbly/cli --dev
yarn run esmbly init

# Or, using NPM:
npm install @esmbly/cli--save-dev
./node_modules/.bin/esmbly init

4. Configuration

If you ran the init command, a config file called esmbly.config.js has automatically been created in the root of your project (e.g. next to your package.json) based on your input.

Most transformers should work out of the box, without the need for any further configuration. Look at the documentation for your selected transformers for details about how to use them and the possible configuration options.

5. Run Esmbly

# Using Yarn:
yarn run esmbly run

# Using NPM:
./node_modules/.bin/esmbly run

# Or, using NPX:
npx esmbly run

Further reading

  • Check out Using the CLI for further details about how to configure Embly.
  • Look at the documentation for your selected transformers for details about how to use them.