This tutorial prepares a local project to use WorkSpec from the terminal and JavaScript.

Prerequisites

Install Node.js 18 or a later version. Confirm the installed versions:

Terminal
node --version
npm --version

Install WorkSpec

  1. Create a project directory and enter it.

    Terminal
    mkdir parcel-workflow
    cd parcel-workflow
  2. Create a local npm project.

    Terminal
    npm init --yes
  3. Install WorkSpec.

    Terminal
    npm install workspec
  4. Print the installed package version.

    Terminal
    npx workspec --version

    The command prints a package version such as:

    Text
    1.2.5
  5. Optional: Install WorkSpec globally to run workspec without npx.

    Terminal
    npm install --global workspec
    workspec --version

Package version and language version

The command prints the npm package version. Your project files declare the WorkSpec language version separately.

Next step

Build your first WorkSpec project with validation, a snapshot, a Constraint, and SVG rendering.