Giter Site home page Giter Site logo

generator-d365-ts-webresource's Introduction

D365 TS WebResource Generator

This is a simple generator to create TypeScript-based Web Resources for Dynamics 365 inspired by Scott Durow's Building JavaScript Web Resources using TypeScript course.

I recommend it to everyone I know, you should definitely take a look into it as it covers a lot more stuff than I added in this generator, then again this is a work in progress and more stuff will be added in the future.

Getting Started

Installation

  • Install Yeoman
  • Install this generator
  • Run the generator in the target folder
npm install -g yo
npm install -g yo generator-d365-ts-webresource
yo generator-d365-ts-webresource

Input

The generator will ask for

  • Namespace: the recommended format is Company.Client.Project, but it's up to you
  • Compiled Web Resource Name: clienthooks by default, you can change it to anything you like, it will always have the .js extension

What you get

You get a project scaffold for building WebResources:

📦my_app_root
┣ 📂src
┃ ┣ 📂Form
┃ ┃ ┗ 📜AccountForm.ts
┃ ┣ 📂Ribbon
┃ ┃ ┗ 📜AccountRibbon.ts
┃ ┣ 📂services
┃ ┃ ┣ 📜EnvVarUtils.ts
┃ ┃ ┗ 📜FlowUtils.ts
┃ ┗ 📜index.ts
┣ 📜.eslintrc.json
┣ 📜.gitignore
┣ 📜.prettierrc.json
┣ 📜package.json
┣ 📜tsconfig.json
┣ 📜webpack.common.js
┣ 📜webpack.dev.js
┗ 📜webpack.prod.js

There are some basic configuration settings for EsLint, Prettier, and the TypeScript compiler.

In the end we use webpack to bundle all into a single file.

The point of entry file is the src/index.ts, there are samples on how to implement specific functionality for Forms and Ribbons.

As a bonus, on the src/services folder there are 2 utilities that I use on almost all my projects to deal with Environment Variables and triggering flows from the front end.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.