Skip to main content
Version: 1.0.0-beta.5+dev

Scripts

Here are the available npm scripts that you can find in the package.json file.

Those scripts must be executed from the project root directory.

Main#

ScriptPurpose
npm run wakeLaunch the hotword process.
npm startRun Leon in production after build.
npm run train expressions (en;fr)Train Leon's understanding.
npm run checkVerify how much Leon is installed/configured.

Setup#

ScriptPurpose
npm run setup:offlineSetup all the offline nodes.
npm run setup:offline-sttSetup the offline STT.
npm run setup:offline-ttsSetup the offline TTS.
npm run setup:offline-hotwordSetup the hotword node.
npm run preinstallTriggered before npm install has started.
npm run postinstallTriggered after npm install has finished.

Build#

ScriptPurpose
npm run delete-dist:serverDelete server distribution folder.
npm run buildBuild Leon (web app + server).
npm run build:appBuild web app.
npm run build:serverBuild server.

Development#

ScriptPurpose
npm run dev:appRun the web app in development.
npm run dev:serverRun the server in development.
npm run prepare-release {VERSION NUMBER}Bump Leon's version and generate changelog according to commit messages.

Testing#

ScriptPurpose
npm run lintVerify project coding syntax.
npm testRun all kind of tests.
npm run test:unitRun unit tests.
npm run test:e2eRun all kind of end-to-end tests.
npm run test:e2e:modulesRun all modules tests.
npm run test:e2e:nlp-modulesRun tests to ensure every expression is understandable.
npm run test:jsonRun tests to verify every JSON file are conform.
npm run test:module {PACKAGE NAME}:{MODULE NAME}Run tests of a given module.

Docker#

ScriptPurpose
npm run docker:buildBuild Leon in Docker.
npm run docker:runStart Leon in Docker.
npm run docker:devStart Leon in development mode within Docker.
npm run docker:checkVerify Leon setup inside Docker.