# Installation

# 0. Requirements

You need to set up your development environment before you can do anything.

Install Node.js® and npm if they are not already on your machine.

Verify that you are running at least node 10.13.x and npm 5.2.x by running node -v and npm -v in a terminal/console window. Older versions maybe produce errors, but newer versions are fine.

You develop apps in the context of an Balm workspace.

To create a new workspace and initial starter app:

mkdir -p balm-project/src/{styles,scripts}
cd balm-project
npm init -y

🔔 BalmJS workflow using gulp for the build process, so you need install gulp-cli globally and gulp local dependency.

yarn global add gulp-cli
yarn add -D gulp
# OR
npm install -g gulp-cli
npm install -D gulp

# Verify
$ gulp -v
# Output:
# CLI version: 2.2.0
# Local version: 4.0.0

# 1. Installing balm

yarn add -D balm
# OR
npm install -D balm

We currently recommend using Yarn instead of npm.

# 2. Configuration

In your project directory, create a file named gulpfile.js in your project root with these contents:

// 1. import balm
const balm = require('balm');

// 2. config balm
balm.config = {
  // Your project config

// 3. run & enjoy

📃 Refer to configuration docs to learn more about config balm.

# 3. Usage

Run the command in your project directory:

# For development

# For production
gulp --production
# OR
gulp -p
Last Updated: 6 months ago