Dynamics Mobile Docs
Ask or search…
Comment on page

NPM Scripts


Dynamics Mobile apps come with predefined NPM scripts - they are defined in package.json. The scripts allow the developer to use simple command to perform frequent tasks during the development process.

Standard Scripts Cheat Sheet

Command line
npm run build
Runs the build process of the app. Used to build/debug the app. Hitting F5/Ctr+Shift+F5 in Visual Studio Code executes the same script.
npm run genbo
Generates Typescript definitions from the business object json definition files. Do not use it directly.
npm run genmap
Generates and opens html document with human readable description of the business objects in the current app
npm run start
Starts local development web server on accessible via http://localhost:3001. Must be executed once, before starting the development process.
npm run release
Builds the application in release mode, which compresses the outputted code as well as runs a deep code check to catch any issues. Might capture more errors than the npm run build command. Can be used to check your code before publishing.
npm run directpublish pushtoall
Compiles the code in release mode and deploys the app in the current application area, making it available to everyone. Use it to publish the app to production.
npm run test
Runs unit tests by utilizing jest. NOTE: You need to manually setup jest for your project, before using this command.
npm run i18n
Exports or imports translation resources to/from CSV files

Adding new scripts

The developer can add more scripts in package.json to use during his daily routines.
Dynamics Mobile provided by Mobile Affairs Ltd. | 1712 Sofia, Bulgaria, Alexander Malinov 51 | [email protected]