Control Add-ins

Control Add-ins Supercharged: Development and production build tasks

I’ve been absent for a while – sometimes it’s difficult to find time for blogging even when I want it. Anyway… here’s the last post in the introductory series of posts that explain my NAV TechDays 2019 demos. In this code example, I explain the difference between typical development and production build configurations, and I show how to configure gulp accordingly.

To check the code example, and to read the detailed explanations of it, jump over to https://github.com/vjekob/supercharged_01/tree/08-gulp-build-prod

Development and production configurations are not an intuitive thing for AL people. However, in the world of C# or JavaScript (or most other programming languages for that matter), you can’t really live without them. Since control add-ins are more about web than about AL, you’ll want to set up these different build configurations.

Typically, you’ll want a development build that’s optimized for development and debugging, and a production build that’s optimized for run-time and performance.

Luckily, it’s very easy to configure gulp to do this for you. And that’s what today’s code example illustrates. You’ll create two separate tasks. Each of these produces a bundle that targets a different need.

On top of that, I also give some simple guidance and hints about a few JavaScript practices.

As I said – this concludes the introductory part. With this, we are done with traditional JavaScript. For better part, we’re done with gulp, too. While I’ll use gulp in future examples, too, it will do much less transformation, and will mostly automate moving files between different workspaces.

Also, in my future examples, I’ll focus on more modern JavaScript as well as modern UI frameworks and toolchains.

Happy coding, and let me know if you find this series useful.

Leave a Reply