felixdivall.com / NetSuite / SDF Tool

Command line

NetSuite SDF Tool

SuiteScripts, written in TypeScript.

A CLI that sets up SuiteScript projects for TypeScript – the part SuiteCloud's own project:create leaves to you – and then adds files, compiles them, and sends them to the File Cabinet.

npm install -g netsuite-ts-sdf-tool

MIT licensed · Needs Node and SuiteCloud CLI

Why

TypeScript, from the first file

SuiteCloud can already make a project – suitecloud project:create -i – but what it makes is JavaScript.

Writing SuiteScript in TypeScript means building the rest yourself: a layout both the compiler and SDF understand, a project.json, a build config that turns TypeScript into the SuiteScript NetSuite runs, and files named the way the rest of the account is named. None of it is the work. nsx does that part, so the first thing you write is the script.

How

Four commands

  1. Set it up once

    Your prefixes, your naming, where things go. Asked once and remembered.

    nsx setup
  2. Make a project

    A TypeScript project – the directories, the config and the build – laid out the way the account expects it.

    nsx create
  3. Add a file

    A new TypeScript file, named to your format, with the build config updated to know about it. nsx template drops in a function you have written before.

    nsx newfile
    nsx template
  4. Build and upload

    Compiles the TypeScript and puts it in the File Cabinet through SuiteCloud. nsx build bun if you would rather use bun.

    nsx build
    → File Cabinet

Specifics

What it is

Written in
TypeScript
Installed with
npm, globally
Builds with
npm or bun
Licence
MIT

One line to install

npm install -g netsuite-ts-sdf-tool