# @brokenrubik/ss-build-tools

> ## Usage on existing projects:

Latest version **3.0.2** (published 2025-06-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install @brokenrubik/ss-build-tools
pnpm add @brokenrubik/ss-build-tools
yarn add @brokenrubik/ss-build-tools
bun add @brokenrubik/ss-build-tools
```

Provides the commands `ss-build`, `ss-watch`, `ss-deploy`, `ss-clean-ts`.

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.2 |
| Published | 2025-06-23 |
| First published | 2023-02-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 21 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lucas Goyeche |
| Maintainers | brokenrubik |

## Links

- npm: https://www.npmjs.com/package/@brokenrubik/ss-build-tools
- npm.io page: https://npm.io/package/@brokenrubik/ss-build-tools

## Dependencies (5)

- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [dotenv](https://npm.io/package/dotenv.md) ^16.0.3
- [shelljs](https://npm.io/package/shelljs.md) ^0.8.5
- [chokidar](https://npm.io/package/chokidar.md) ^3.5.3
- [minimist](https://npm.io/package/minimist.md) ^1.2.8

## Recent versions

- 3.0.2 (latest) — 2025-06-23
- 2.0.5 — 2024-02-21
- 2.0.4 — 2024-02-01
- 2.0.3 — 2024-01-31
- 2.0.2 — 2024-01-24
- 2.0.1 — 2024-01-10
- 2.0.0-beta.0 — 2024-01-07
- 1.0.9 — 2023-03-07
- 1.0.8 — 2023-03-03
- 1.0.8-beta.0 — 2023-03-03
- 1.0.7 — 2023-02-21
- 1.0.6 — 2023-02-21
- 1.0.5 — 2023-02-21
- 1.0.4 — 2023-02-21
- 1.0.3 — 2023-02-21

## README

# SuiteScript Build Tools

## Usage on existing projects:

1. Install dependency in your project (started from [ss-template](https://github.com/BrokenRubik/ss-template))

```
npm i -D @brokenrubik/ss-build-tools@latest
```

Example package.json:

```json
{
  "scripts": {
    "deploy": "ss-deploy",
    "build": "ss-build",
    "watch": "ss-watch"
  }
}
```

## Building

The default TypeScript source path is set to `"src/TypeScript"`. If you want to specify a different path you can either:

- Use the TS_SOURCE_PATH environment variable
- Use the `--source-path` command line argument

For example:
```json
{
  "scripts": {
    "build": "ss-build --source-path src/ts-files"
  }
}
```

The output of the build command will be be placed in the `outDir` specified in your `tsconfig.json` file.

We recomend setting the `outDir` to `"src/FileCabinet/SuiteScripts/<Project Name>"`.

### `ss-build -js` flag
You can pass the `-js` flag to the build command to copy files from the `src/SuiteScripts` directory to the `src/FileCAbinet/SuiteScripts` directory.

## Deploying

Running the deploy command will automatically build, and pass the arguments.
You can specify the source path in the same way as the build command.

The files in `"src/FileCabinet/SuiteScripts"` will be deployed using `suitecloud` commands.

## Watch Mode (Experimental)

Running the watch command will automatically build and deploy on file changes.

This is useful for development, but it is not recommended to use this in production.

The watch mode will incrementally build the TypeScript output, and deploy files that have changed.

You can specify the source path in the same way as the build command. The default is `"src/TypeScript"`.
```json
{
  "scripts": {
    "watch": "ss-watch --source-path src/TypeScript"
  }
}
```

## Prefixing the project's File Cabinet directory
You can use the `FILE_PATH` environment variable to prefix the project's dir.

For example, if you create a `.env` file with:
```
FILE_PATH=my-custom-scripts
```

Then, only files under `src/FileCabinet/SuiteScripts/my-custom-scripts` will be deployed.

---
_Source: https://npm.io/package/@brokenrubik/ss-build-tools · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
