@_neronotte/cra-template-dataverse-webresource
v1.0.9
Published
A template to create CRM Web Resource projects with Create-React-App
Downloads
23
Maintainers
Readme
cra-template-dataverse-webresource
If you want to create a DataVerse WebResource that leverages React, Typescript and Fluent UI, the activities and skils needed to setup the project are often much more complicated that the actual implementation of the webresource.
The aim of this package is to automate the activities needed to startup a simple DataVerse WebResource project, allowing developers to focus on the actual webresource content.
Usage
The package content is a custom template for create-react-app.
To start, open a console and type:
npx create-react-app <your-webresource-name> --template @_neronotte/cra-template-dataverse-webresource
Replace <your-webresource-name>
with the name of your webresource.
Once the template has been installed, move in the .\<your-webresource-name>
folder and:
- Change the value of the title tag of the
./public/index.html
page to provide a meaningful title for your webresource. - If needed, in the same
./public/index.html
page change the relative url of./ClientGlobalContext.js.aspx
page. - Update
./src/App.tsx
file, the entry point of your custom webresource. - Calculate the path of the folder where you want to save the build outputs, relative to the one of the current package, search for all the occurrence of the
<output path>
string and replace it with the calculated path (there should be 3 occurrences, one in theconfig-overrides.js
file, 3 in thescripts
section ofpackage.json
file)
References
Webpage (HTML) web resources GetGlobalContext function and ClientGlobalContext.js.aspx (Client API reference) Goodbye HTML Web Resources...