formulahendry / teamsfx-migrator

Home Page:https://www.npmjs.com/package/tfx-migration-helper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tfx-migration-helper

CLI to reduce manual steps to migrate samples to TeamsFX V3.

Usage

  1. Install the CLI

    npm install tfx-migration-helper -g
    
  2. cd to the root folder of the project to be migrated

  3. Run migration command:

    tfxm migrate -t <app-type> -n <app-name>
    

    e.g.

    tfxm migrate -t tab -n personal-tab
    

Migration steps

Tab

Use https://github.com/formulahendry/Microsoft-Teams-Samples/tree/junhan/v3/samples/tab-ui-templates/ts as example, the steps are:

  • Run tfxm migrate -t tab -n tab-ui-templates
  • Update .gitignore: copy or append content from .gitignore.example
  • Update placeholder in manifest.json
  • Update teamsapp.local.yml
    • Change value of manifestPath to ./src/manifest/manifest.json
  • Update package.json
    • Install dev dependency: npm install --save-dev env-cmd
    • Add 'dev:teamsfx' in 'scripts' section, and update "start" section:
      "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start",
      "start": "react-scripts start",
      

Tab SSO

Use https://github.com/formulahendry/Microsoft-Teams-Samples/tree/junhan/v3/samples/tab-sso/nodejs as example, the steps are:

  • Run tfxm migrate -t tab-sso -n tab-sso

  • Update .gitignore: copy or append content from .gitignore.example

  • Update placeholder in manifest.json

  • Update package.json, add 'dev:teamsfx' in 'scripts' section:

    "dev:teamsfx": "npm run start",

  • Add redirect url in replyUrlsWithType of aad.manifest.json

    {
        "url": "${{TAB_ENDPOINT}}/auth-end",
        "type": "Spa"
    },
    {
        "url": "${{TAB_ENDPOINT}}/Home/BrowserRedirect",
        "type": "Spa"
    },

Bot SSO

Use https://github.com/formulahendry/Microsoft-Teams-Samples/blob/junhan/v3/samples/bot-conversation-sso-quickstart/js/ as example, the steps are:

About

https://www.npmjs.com/package/tfx-migration-helper


Languages

Language:Bicep 52.5%Language:JavaScript 47.5%