1.5.4 • Published 6 months ago

apex-dx v1.5.4

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

Apex DX CLI

Apex DX CLI is a command-line tool to add components and dependencies to your project, run performance audits, and manage style tokens.

Usage

Commands

create

Create a project from a template. You will be prompted for a template repository and your response will be saved for your convenience, to change the template repository pass the reset flag.

npx apex-dx create [options]

Options:

  • -n, --name <name>: Project name
  • -d, --defaults: Use default project configuration
  • -f, --force: Force install in a non-empty directory
  • -r, --reset: Change template repository
  • -s, --skip: Skip project install

util

Add packages from a repository. You will be prompted for a template repository and your response will be saved for your convenience, to change the template repository pass the reset flag.

apex-dx util [packages...] [options]

Options:

  • -a, --all: Install all packages
  • -r, --reset: Reset package repository
  • -o, --overwrite: Overwrite existing files

style-tokens

Convert tokens to any format using Token Studio export.

apex-dx style-tokens [`css` | `js` | `accelerator`] [options]

Transforms:

css: Creates global and dark css files with css variables js: Creates js files for all tailwind utilities in the tailwind collection in figma accelerator: Creates both css and js ready to be added to your project.

Options:

  • -i, --input <input>: Token JSON file
  • -o, --output <output>: Output directory
  • -s, --selector <selector>: Override CSS selector
  • -p, --prefix <prefix>: Prefix for properties
  • -ci, --continuous-integration <continuous-integration>: Using continuous integration

run-audit

Run a performance audit of a webpage.

apex-dx run-audit [url] [options]

Options:

  • -m, --multiplier [multiplier]: Reset CPU throttle multiplier
  • -r, --reset [reset]: Reset CPU throttle multiplier
  • -bi, --benchmarkIndex [benchmarkIndex]: Reset CPU throttle multiplier
  • -runs, --runs [run]: Number of tests to run (default: 3)
  • -p, --platform <platform>: Platform to run audit on (mobile, desktop) (default: mobile)
  • -o, --open [open]: Open results in browser

Examples

Create a new project

npx apex-dx create -n myProject

Add packages from a repository

npx apex-dx util package1 package2

Convert style tokens

npx npx apex-dx style-tokens -i tokens.json -o output

Run a performance audit

npx apex-dx run-audit https://example.com -runs 5

Running Development Server

Install Package

npm install

Start Server

npm run dev

Any changes you make to cli files will be immediately testable by simply running the npx commands in terminal.

License

MIT