0.7.2 • Published 4 years ago

@varius.io/varius-cli v0.7.2

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

Vatom™ Studio CLI

Start with authenticating

varius auth

To create a new view:

varius view new Follow the steps:

  1. view name
  2. view description
  3. businessId

Currently there isn’t a smooth way to mock vAtoms locally. The below manual changes need to be made:

  1. Open App.json
  2. Replace export default withObject(App) with export default App
  3. You will also need to mock an object with whatever its configurable viewArgs will be

Replace

  get viewArgs() {
    const stateKey = "insert_view_uri"; /* example - card::varius.view:varius.io:pxbPne2LjfMvz9X1qb4X3 */
    return (this.props.object.state || {})[stateKey];
  }

With

  get viewArgs() {
    return {
      backgroundImage: "some-url",
      titleSequence: "",
      buttonColor: {
        r: 255,
        g: 255,
        b: 255,
        a: 0
      }
    };
  }

And reference them like below:

  <img src={this.viewArgs.backgroundImage} 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 varius view publish There will be a view.json file that generates in the source code with an entrypoint reference (This is the view url).

{
  "name": "my-varius-app",
  "description": "my varius app description",
  "entrypoint": "https://views.varius.io/8479681b-4987-4c13-b99f-75828df8c277/index.html",
  "supported_types": [
    "card"
  ],
  "params": {
    "$schema": "http://json-schema.org/schema#",
    "type": "object",
    "required": [],
    "additionalProperties": false,
    "properties": {}
  }
}
{
    "$schema": "http://json-schema.org/schema#",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "image": {
            "title": "Photo",
            "$ref": "https:\/\/schemas.varius.io\/v1\/Image.json",
            "imageAspectRatio": 1,
            "default": {
                "type": "image/gif",
                "ref": "<insert_url_here>"
            }
        },
        "text": {
            "type": "string",
            "title": "Text",
            "default": "<insert_text_here>"
        },
        "color": {
            "title": "Text Color",
            "default": {
                "r": 0,
                "b": 0,
                "g": 0,
                "a": 1
            },
            "description": "Color of the text.",
            "$ref": "https:\/\/schemas.varius.io\/v1\/Color.json"
        }

    },
    "required": []
}

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

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

5 years ago

0.6.21

5 years ago

0.6.20

5 years ago

0.6.19

5 years ago

0.6.18

5 years ago

0.6.17

5 years ago

0.6.16

5 years ago

0.6.15

5 years ago

0.6.14

5 years ago

0.6.13

5 years ago

0.6.12

5 years ago

0.6.11

5 years ago

0.6.10

5 years ago

0.6.9

5 years ago

0.6.8

5 years ago

0.6.7

5 years ago

0.6.6

5 years ago

0.6.5

5 years ago

0.6.4

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.10

5 years ago

0.5.9

5 years ago

0.5.8

5 years ago

0.5.7

5 years ago

0.5.6

5 years ago

0.5.5

5 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.5

5 years ago

0.4.4

5 years ago

0.4.3

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.29

5 years ago

0.2.28

5 years ago

0.2.27

5 years ago

0.2.26

5 years ago

0.2.25

5 years ago

0.2.24

5 years ago

0.2.23

5 years ago

0.2.22

5 years ago

0.2.21

5 years ago

0.2.19

5 years ago

0.2.18

6 years ago

0.2.17

6 years ago

0.2.16

6 years ago

0.2.15

6 years ago

0.2.14

6 years ago

0.2.12

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago