generator-typescript-wab-widget

0.2.43 • Public • Published

generator-typescript-wab-widget Build Status

Yeoman generator to create custom Dojo widgets for Esri WebApp Builder applications.

About

This generator scaffolds out the boilerplate files that are need each time you create a new custom WebApp Builder widget. The structure is designed to remove dependancy on the WAB to enable tests to be easily written and allow rapid development testing within the html test page. It replaces the previous generator which relied on interfaces and instead uses the decorator pattern for dojo inheritance.

It creates:

  • TypeScript Widgets.
  • Pure dojo widget inside the esri WAB BaseWidget.
  • A test html page with the dojo widget for development outside of the WAB.

A sample of the generated TypeScript widget can be viewed here

This generator was adapted from @steveoh's generator-dojo-widget, @tomwaysons generator-esri-widget and Esri/generator-esri-appbuilder-js.

Getting Started

Installation

To install Yeoman from npm (if not already), run:

$ npm install -g yo

To install generator-esri-widget from npm, run:

$ npm install -g generator-typescript-wab-widget

Running the Generator

Navigate to your application's widgets folder and run the following at the command line:

$ yo typescript-wab-widget

tsconfig.json

The following options should be set in the tsconfig (noImplicitUseStrict and experimentalDecorators):

{
    "compilerOptions": {
        "sourceMap": true,
        "target": "es5",
        "module": "amd",
        "experimentalDecorators": true,
        "moduleResolution": "classic",
        "noImplicitUseStrict": true
    }
}

License

MIT

Package Sidebar

Install

npm i generator-typescript-wab-widget

Weekly Downloads

0

Version

0.2.43

License

MIT

Unpacked Size

87.5 kB

Total Files

22

Last publish

Collaborators

  • davewilton