@modyo/cli
Version:
Modyo CLI Command line to expose local development tools
318 lines • 10.4 kB
JSON
{
"version": "3.5.2",
"commands": {
"get": {
"id": "get",
"summary": "Pull a widget from our catalog into a new directory",
"description": "In general, the `get` command is used to obtain a boilerplate widget.",
"strict": true,
"pluginName": "@modyo/cli",
"pluginAlias": "@modyo/cli",
"pluginType": "core",
"aliases": [],
"examples": [
"There are some public widget names that can be accessed via this command",
{
"description": "To initialize a widget",
"command": "<%= config.bin %> <%= command.id %> dynamic-react-base-template [DIRECTORY]"
},
{
"description": "From this command and on you can continue using the widget like any other front-end widget.\nYour organization can create its own custom templates to initialize new widgets and use them with the `organization` option",
"command": "<%= config.bin %> <%= command.id %> --organization=myOrganization my-custom-template-repo [DIRECTORY]"
}
],
"flags": {
"force": {
"name": "force",
"type": "boolean",
"char": "f",
"description": "Override folder if exist",
"allowNo": false
},
"help": {
"name": "help",
"type": "boolean",
"char": "h",
"description": "Output usage information",
"allowNo": false
},
"organization": {
"name": "organization",
"type": "option",
"char": "o",
"description": "Github Organization",
"multiple": false,
"default": "dynamic-framework"
}
},
"args": {
"name": {
"name": "name",
"description": "The name of the widget",
"required": true
},
"directory": {
"name": "directory",
"description": "Name of directory to init",
"required": false
}
}
},
"preview": {
"id": "preview",
"summary": "Preview local widget over Modyo platform",
"description": "The `preview` command is responsible for informing the platform about local entry points so that the widget can be rendered on the platform locally.\n\nMODYO_VERSION=version\nMODYO_TOKEN=token\nMODYO_ACCOUNT_URL=account-url\nMODYO_SITE_ID=siteId\nMODYO_SITE_HOST=siteHost\nMODYO_LOCAL_PORT=port\nMODYO_LOCAL_DOM_ID=domId\nMODYO_LOCAL_ENTRY_JS=entryJs\n",
"strict": true,
"pluginName": "@modyo/cli",
"pluginAlias": "@modyo/cli",
"pluginType": "core",
"aliases": [],
"examples": [
"$ modyo-cli preview\n "
],
"flags": {
"help": {
"name": "help",
"type": "boolean",
"char": "h",
"description": "Output usage information",
"allowNo": false
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "Modyo Api token",
"required": true,
"multiple": false
},
"version": {
"name": "version",
"type": "option",
"char": "v",
"description": "Version of Modyo platform",
"multiple": false,
"options": [
"8",
"9",
"10"
],
"default": "9"
},
"account-url": {
"name": "account-url",
"type": "option",
"char": "u",
"description": "URL of your ®Modyo account ex(\"https://account.modyo.com\")",
"required": true,
"multiple": false
},
"site-id": {
"name": "site-id",
"type": "option",
"char": "i",
"description": "Id of the site where the widget will be previewed",
"multiple": false,
"exclusive": [
"site-host"
]
},
"site-host": {
"name": "site-host",
"type": "option",
"char": "n",
"description": "Host of the site where the widget will be previewed",
"multiple": false,
"exclusive": [
"site-id"
]
},
"port": {
"name": "port",
"type": "option",
"char": "p",
"description": "Deploy port local widget running",
"multiple": false,
"default": "8080"
},
"dom-id": {
"name": "dom-id",
"type": "option",
"char": "s",
"description": "Container id of the widget",
"multiple": false,
"default": "widgetName"
},
"entry-js": {
"name": "entry-js",
"type": "option",
"char": "j",
"description": "Entry JS file of the widget",
"multiple": false,
"default": "main.js"
}
},
"args": {}
},
"push": {
"id": "push",
"summary": "Push widget to Modyo platform",
"description": "The `push` command is the one in charge of the integration principle, used to send the widget to the selected site in the modyo platform.\n\nIt will use an argument called name to upload the widget to the platform and some required flags like token site_base id or host to can identify the ®Modyo platform which host the widget and have an additional flag to avoid the manual process flow of widget publication.\n\nMany of the options can be defined as environment variables or inside an .env file that is recommended to avoid the publication to the GitHub registry because can contain some delicate information\n\nMODYO_BUILD_DIRECTORY=buildDirectoryPath\nMODYO_VERSION=version\nMODYO_TOKEN=token\nMODYO_ACCOUNT_URL=account-url\nMODYO_SITE_ID=siteId\nMODYO_SITE_HOST=siteHost\nMODYO_BUILD_COMMAND=buildCommand\nMODYO_REGEX_EXCLUDE=regexToExcludeFiles\nMODYO_DISABLE_LIQUID_REGEX=regexToDisableLiquidOnFiles\nMODYO_ZIP=true\nMODYO_ZIP_ENTRY_JS=main.js\nMODYO_ZIP_ENTRY_CSS=main.css\n",
"strict": true,
"pluginName": "@modyo/cli",
"pluginAlias": "@modyo/cli",
"pluginType": "core",
"aliases": [],
"examples": [
"$ modyo-cli push\n "
],
"flags": {
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "Modyo Api token",
"required": true,
"multiple": false
},
"publish": {
"name": "publish",
"type": "boolean",
"char": "p",
"description": "Force widget publication",
"allowNo": false
},
"help": {
"name": "help",
"type": "boolean",
"char": "h",
"description": "Output usage information",
"allowNo": false
},
"build-directory": {
"name": "build-directory",
"type": "option",
"char": "d",
"description": "Build directory path",
"multiple": false,
"default": "dist"
},
"version": {
"name": "version",
"type": "option",
"char": "v",
"description": "Version of Modyo platform",
"multiple": false,
"options": [
"8",
"9",
"10"
],
"default": "9"
},
"account-url": {
"name": "account-url",
"type": "option",
"char": "u",
"description": "URL of your ®Modyo account ex(\"https://account.modyo.com\")",
"required": true,
"multiple": false
},
"site-id": {
"name": "site-id",
"type": "option",
"char": "i",
"description": "Id of the site where the widget will be push",
"multiple": false,
"exclusive": [
"site-host"
]
},
"site-host": {
"name": "site-host",
"type": "option",
"char": "n",
"description": "Host of the site where the widget will be push",
"multiple": false,
"exclusive": [
"site-id"
]
},
"build-command": {
"name": "build-command",
"type": "option",
"char": "b",
"description": "Build command in package.json",
"multiple": false,
"default": "build"
},
"regex-exclude": {
"name": "regex-exclude",
"type": "option",
"char": "r",
"description": "Exclude file that match a regex",
"hidden": true,
"multiple": false,
"default": "preview_script.js"
},
"remove-emojis": {
"name": "remove-emojis",
"type": "boolean",
"char": "e",
"description": "Remove emojis from the widget that will be push ",
"allowNo": true
},
"disable-liquid": {
"name": "disable-liquid",
"type": "boolean",
"char": "l",
"description": "Disable liquid on all files",
"allowNo": false,
"exclusive": [
"disable-liquid-regex"
]
},
"disable-liquid-regex": {
"name": "disable-liquid-regex",
"type": "option",
"char": "f",
"description": "Disable liquid on files that match a regex",
"multiple": false,
"exclusive": [
"disable-liquid"
]
},
"zip": {
"name": "zip",
"type": "boolean",
"char": "z",
"description": "Zip bundle to publish",
"allowNo": false
},
"zip-entry-js": {
"name": "zip-entry-js",
"type": "option",
"char": "j",
"description": "Entry js file when use --zip flag",
"multiple": false,
"default": "main.js"
},
"zip-entry-css": {
"name": "zip-entry-css",
"type": "option",
"char": "c",
"description": "Entry css file when use --zip flag",
"multiple": false,
"default": "main.css"
}
},
"args": {
"name": {
"name": "name",
"description": "The name of the widget",
"required": false
}
}
}
}
}