ElioStruyf GitHub Star | M365 Development, Developer Technologies MVP | Google Developer Expert Azure | Microsoft 365 | Visual Studio Code

Along with acting as VP of BIWUG (Belgian Information Worker User Group), Elio is an independent contractor for his own consulting company, Struyf Consulting.

Extend Karma to get better code coverage and test reports for your SharePoint Framework solutions

In one of the previous posts I showed that since SharePoint Framework version 1.2.0, code coverage reports were added. When you run the gulp test task, it will execute the tests, and generate a code coverage report which you can find under the temp/coverage/js project folder. Read more about this in the following article: SharePoint Framework code coverage reports for unit-tests

Read more

How to load scripts that are required for your item display template rendering

Based on the number of questions I receive in my mailbox, I can see that display templates are not yet forgotten. A long time ago, I wrote about how to correctly include scripts into your display templates. Read more: Correctly including scripts into your display templates The main issue when using the default functions (for example $includeScript) to include scripts into your templates, is that they are loading your scripts asynchronously.

Read more

Using base64 encoded images as the web part icon in SPFx

Web part icons help you to distinguish your web part between all the others. Show image Modern client-side web parts SharePoint Framework provides use two options at this moment of specifying an icon: Office UI Fabric font icons (officeFabricIconFontName) Images by providing a URL (iconImageUrl) Info: Waldek Mastykarz wrote a great article about this a while ago.

Read more

SharePoint Framework code coverage reports for unit-tests

A while ago I wrote an article about writing unit tests for your SharePoint Framework components. One of the missing things was a code coverage report to check how well you unit-test your codebase. Read more: Writing unit-tests for your SharePoint Framework components Apparently, with the v1.2.0 of SharePoint Framework they added a tool called Istanbul which can generate such reports.

Read more

Creating multi-component bundles in SharePoint Framework solutions

One of the new things in the latest releases is the functionality to bundle multiple components into a single JavaScript bundle file. Quote: Multi-component bundles can make it easier to share code and logic across similar components, as well as reduce the overall size of your JavaScript since you only get one instance of the shared code.

Read more
Back to top