Socket
Book a DemoInstallSign in
Socket

@alisonc/squidget-hello

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alisonc/squidget-hello

1. Copy the `widget-starter` folder and rename as needed 2. Create new components in [./src/components](./src/components) as new folders, for example [./src/components/sqh-my-component](./src/components/sqh-my-component)

0.0.5
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

How to build and deploy custom widgets

  • Copy the widget-starter folder and rename as needed

  • Create new components in ./src/components as new folders, for example ./src/components/sqh-my-component

  • Before you begin:

  • Develop Stencil components locally

  • Build and publish to NPM under personal user to @saasquatch-themes/my-theme-components@1.0.0

    • npm login
    • npm run build 2a. Navigate to dist/my-theme-components/my-theme-components.js and find + remove window.location.origin from the built file (only needed if loading these components in an iframe)
    • npm publish --access public
  • Implement widget in portal widget editor

    • Reference deployed components in advanced section of the widget editor:

      dependencies:

      package: @saasquatch-themes/my-theme-components
      version: 1.0.0
      filePath: /dist/mint-components/my-theme-components.js
      

      plugins:

      package: @saasquatch-themes/my-theme-components
      version: 1.0.0
      filePath: /grapesjs/grapesjs.js
      
    • Import custom html from index.html

  • Test widget in browser using squatch.js library

    • go to http://squathjs-demo.surge.sh
    • Fill out tenantAlias, domain, user, widgetType (p/[programId]/w/referrerWidget), and jwt fields for squatch initObj in config
    • jwt can be generated at https://jwt.io using the user object from config as the payload
      {
         "user":{
            "id":"my-user-id",
            "accountId":"my-account-id"
         }
      }
      
      and your tenant's API key in the Verify Signature section
    • Reload config

flowchart

FAQs

Package last updated on 17 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.