2.4.12 • Published 3 months ago

@vatom/cli v2.4.12

Weekly downloads
1
License
-
Repository
-
Last release
3 months ago

Vatom™ Studio CLI

You can install globally or use with npx..

npx -p @vatom/cli vatom auth npx -p @vatom/cli vatom design new

OR

npm install -g @vatom/cli vatom auth vatom design new

If you see this error: gyp: No Xcode or CLT version detected!, there's an OS Catalina issue. See link below for debugging:

https://medium.com/flawless-app-stories/gyp-no-xcode-or-clt-version-detected-macos-catalina-anansewaa-38b536389e8d

Start with authenticating

vatom auth

To create a new design:

vatom design new This will create both a 'Design' and a subordinate 'View'. The new 'Design' will be immediately published into Studio and a new 'View' project will be created that you can use for your development. Follow the steps to create your 'Design' and 'View':

  1. name
  2. description
  3. businessId
  4. blueprintId

To create a new view:

vatom view new This will create a standalone 'View' and will require assitance from support to associate with a 'Design'. Follow the steps to create your 'View':

  1. name
  2. description
  3. businessId
  4. blueprintId

Developing your View:

Replace

const App = ({
	isLoading,
	viewArgs,
	getColor,
	getFontStyles,
	interactWithViewer,
	performAction,
	object,
	toHTML,
}) => {

With

const App = ({
	// isLoading,
	// viewArgs,
	// getColor,
	// getFontStyles,
	// interactWithViewer,
	// performAction,
	// object,
	// toHTML,
}) => {

  // you'll have to manually create the commented out vatom properties to run locally :( See example:
  const viewArgs = { backgroundImage: { type: "image/png", ref: "insert resource url here" }}

And reference them like below:

  <img src={viewArgs.backgroundImage.ref} alt="bg" />

Publishing a View

When you’re ready to publish, make sure to revert the above changes you made and run a build. yarn build || npm build vatom view publish There will be a vatom.lock file that generates in the source code with an entrypoint reference (This is/will be the view url).

{
  "id": "exIOpXe0fV",
  "businessId": "sfpGNTg9PQ",
  "entrypoint": "https://views.vatom.com/sfpGNTg9PQ/exIOpXe0fV/index.html" || "", // if this is the initial upload, the entrypoint will be ""
  "groupId": "exIOpXe0fV"
}

There will also be a config-schema.json file that generates. This file will be used if you want to take advantage of studio's generic view form arguments. The format is utilizing jsonSchema to generate appropriate form elements for your view. See example below:

{
    "$schema": "http://json-schema.org/schema#",
    "type": "object",
    "required": [],
    "additionalProperties": false,
    "properties": {
        "backgroundImage": {
            "title": "Background Image",
            "$ref": "https:\/\/schemas.varius.io\/v1\/Image.json",
            "default": {
                "type": "image/png",
                "ref": "https://resources.varius.io/system/defaults/views/reverse-redeem-v1/Before.png"
            }
        },
        "text": {
            "title": "Sampe Text Field",
            "description": "",
            "type": "string"
        },
        "textColor": {
            "title": "Sample Text Color Accessory",
            "default": {
                "r": 0,
                "b": 0,
                "g": 0,
                "a": 1
            },
            "description": "Color of the code text background.",
            "accessoryTargetPointer": "\/designValues\/varius.placeholder:varius.io:card-v1\/config\/text",
            "$ref": "https:\/\/schemas.varius.io\/v1\/Color.json"
        },
        "codeTextFont": {
            "title": "Sample Custom Font",
            "default": {
                "family": [
                    "Advent Pro",
                    "sans-seriff"
                ],
                "style": "normal",
                "variant": "normal",
                "stretch": "normal",
                "weight": 500,
                "effects": [],
                "size": 1
            },
            "description": "Font Family",
            "accessoryTargetPointer": "\/designValues\/varius.placeholder:varius.io:card-v1\/config\/text",
            "$ref": "https:\/\/schemas.varius.io\/v1\/Font.json"
        },
        "textNudge": {
            "title": "SampleText Nudge Accessory",
            "default": {
                "x": 0,
                "y": 20
            },
            "axis": "vertical",
            "accessoryTargetPointer": "\/designValues\/varius.placeholder:varius.io:card-v1\/config\/text",
            "$ref": "https:\/\/schemas.varius.io\/v1\/Point.json"
        }
    }
}

Versioning is currently not supported. If you want to make a new version, you will need to run: vatom design new

To create a new plugin:

vatom plugin new Follow the steps:

  1. id
  2. version
  3. name
  4. description
  5. category
  6. business Id
  7. price
  8. release notes
  • index.js - this is a sample file & is where you will write your plugin
  • 'icon' folder - copy the icon of the plugin here (only .jpg, .jpeg, .png, .gif, .ico file types allowed)
  • 'gallery' foler - copy the set of gallery images that represent your plugin here (only .jpg, .jpeg, .png, .gif, .ico file types allowed)
  • vatom.lock - stores all the metadata about the plugin along with the entrypoint reference pointing to the hosting location of the plugin

Developing your plugin:

Publishing a Plugin

When you’re ready to publish, make sure to run a build and then: vatom plugin publish

Versioning a Plugin

To upgrade the version number of your plugin sematically, you can simply run: vatom plugin version

2.4.12

3 months ago

2.4.11

3 months ago

2.4.10

3 months ago

2.4.9

4 months ago

2.4.5

9 months ago

2.4.4

9 months ago

2.4.7

9 months ago

2.4.6

9 months ago

2.4.3

11 months ago

2.4.1

1 year ago

2.4.0

1 year ago

2.4.2

1 year ago

2.3.8

1 year ago

2.3.7

1 year ago

2.3.9

1 year ago

2.3.6

1 year ago

2.3.11

1 year ago

2.3.10

1 year ago

2.3.2

1 year ago

2.3.1

1 year ago

2.3.4

1 year ago

2.3.5

1 year ago

2.2.22

2 years ago

2.3.0

1 year ago

2.2.20

2 years ago

2.2.21

2 years ago

2.2.17

2 years ago

2.2.18

2 years ago

2.2.15

2 years ago

2.2.16

2 years ago

2.2.13

2 years ago

2.2.14

2 years ago

2.2.19

2 years ago

2.2.0

2 years ago

2.2.4

2 years ago

2.2.11

2 years ago

2.2.7

2 years ago

2.2.6

2 years ago

2.2.10

2 years ago

2.1.16

2 years ago

2.1.14

2 years ago

2.1.15

2 years ago

2.1.12

2 years ago

2.1.13

2 years ago

2.1.19

2 years ago

2.1.27

2 years ago

2.1.28

2 years ago

2.1.25

2 years ago

2.1.26

2 years ago

2.1.23

2 years ago

2.1.6

2 years ago

2.1.24

2 years ago

2.1.8

2 years ago

2.1.22

2 years ago

2.1.7

2 years ago

2.2.8

2 years ago

2.1.29

2 years ago

2.1.30

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.4

2 years ago

2.1.3

2 years ago

2.1.5

2 years ago

2.1.0

2 years ago

2.0.0

3 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago