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 --versionInstall WorkSpec
-
Create a project directory and enter it.
Terminalmkdir parcel-workflow cd parcel-workflow -
Create a local npm project.
Terminalnpm init --yes -
Install WorkSpec.
Terminalnpm install workspec -
Print the installed package version.
Terminalnpx workspec --versionThe command prints a package version such as:
Text1.2.5 -
Optional: Install WorkSpec globally to run
workspecwithoutnpx.Terminalnpm 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.