# Scaffold Demo

This is a scaffold demo for UIExtension, including an open-source UI addon. It shows how to customize UI and how to use declaration file. The demo can be accessed at ./examples/UIExtension/scaffoldDemo.

# How to run this demo

# Setup library

Execute command npm run setup in the demo root folder.

This setup would:

  • Add the lib directory to the dependency list as a local npm repository.
  • install all npm package that needed.

# Run demo

Execute command: npm start

# Source code

The structure of src folder:

│  addons.js                        --- shows how to use foxit addons.
│  index.js                         --- entry.
│
└─addonExample                      --- an addon example. 
    │  addon.info.json              --- addon entry file, which specified all related file in an addon.
    │  index.css                    --- style sheet
    │  index.js                     --- addon script entry. DON'T modify it's file name.
    │
    ├─locales                       --- i18n files
    │      en-US.json
    │      zh-CN.json
    │
    ├─stateHandlers                 --- State Handler Classes which extend IStateHandler 
    │      addTextField.js
    │
    └─templates
            custom-dialog.art       --- Art template for customized dialog.
            tab-template.art        --- Art template for customized tool bar.

# Entry file

The src/addonExample/index.js file is the script entry for addon. View source file for more details.