Home Manual Reference Source

projext CLI

The projext Command-Line Interface allows you to tell projext which tasks you want to execute and for which targets.

You can run this commands with either yarn, npx or by using a package.json script.

Available commands

Build targets

It builds a target and moves it bundle to the distribution directory.

projext build [target] [--type [type]] [--watch] [--run] [--inspect] [--analyze]

Watching a target

It tells projext to watch your target files and update the build if they change.

projext run [target]

This is basically an alias of projext build that uses the --watch flag by default.

Running a target

If the target is a Node app, it will execute it, otherwise, it will bring up an http server to "run" your target.

projext run [target] [--inspect]

This is basically an alias of projext build that uses the --run flag by default.

Inspecting a Node target

If the target is a Node app, it will execute it and enable the Node inspector.

projext inspect [target]

This is basically an alias of projext build that uses the --run and --inspect flags by default.

Analyzing a target bundle

This is for bundled targets, it tells the build engine to use the analyzer and show the stats for the generated bundle.

projext analyze [target] [--type [type]]

This is basically an alias of projext build that uses the --analyze flag by default.

Cleaning previous builds

Removes the files from previous builds from the distribution directory.

projext clean [target] [--all]

This gets automatically called when building if the target cleanBeforeBuild setting is true.

Copy the project files

If the feature is enabled (check the project configuration document), this will copy the files and/or directories specified on the feature settings to the distribution directory.

projext copy-project-files

This gets automatically called when building if the feature is configured to run when building.

Create the revision file

If the feature is enabled (check the project configuration document), this will create the revision file with the project version.

projext create-revision

This gets automatically called when building if the feature is configured to run when building.

Read the project settings

It logs all the project settings on the console. You can also specify a directory-like path to access specific settings.

projext info [path]

Generate resources

projext zero configuration assumes a lot of things about your project in order to run it without a configuration file: Your target(s) settings and, for browser targets, the default HTML.

This command allows you to write down those resources on your project so you can manually modify them:

projext generate [resource] [options]

Resources:

For more information about the generators, please check the Zero configuration document.