Skip to content

Commit

Permalink
[V2 2623] update cli for new btr (#8)
Browse files Browse the repository at this point in the history
* update cli commands publish, update, release

* resolve linter

* update README

* fixed issues

* remove period

* address PR comments

* fix issues

* add rollback command

* add git handler

* finish new major version flow

* update README

* fix btr api

* address PR comments

* add fix command

* make git optional and propogate api errors

* fix base64 encoding

* fix baset64 encode

* fix name formatting

* update README

* [V2-2707] Sending version to BTR (#1)

* bump version

* remove version bump
  • Loading branch information
bpeters authored and santios-volusion committed Apr 12, 2019
1 parent ab0f554 commit 26fdd36
Show file tree
Hide file tree
Showing 15 changed files with 2,730 additions and 1,173 deletions.
31 changes: 29 additions & 2 deletions README.md
Expand Up @@ -30,21 +30,28 @@ Use the same credentials you use to log into your [Volusion store admin](https:/

* * *

### `element new NAME`
### `element new NAME --git`

The command for scaffolding a new block. The command will clone the [Element Block Starter repo](https://github.com/volusion/element-blockstarter), allowing you to quickly get started with your development process.

You can use the optional `--git` flag to let git handle your block commits and major versions.

* * *

### `element publish --name "A NAME TO DISPLAY TO USERS" --category "OPTIONAL CATEGORY"`
### `element publish --name "A NAME TO DISPLAY TO USERS" --category "OPTIONAL CATEGORY" --new-major`

From the root directory of the block you intend to eventually make available to users of the Site Designer on the [Volusion store admin](https://admin.volusion.com).

Publishing your first block also will create a v1 branch to manage the version code base.

By default, _newly-published blocks will only be visible to you and the other members of your organization_.

In the event that a `-c/--category` flag is not passed, you will be prompted with a list of valid Category names from which to select.

If you pass `-m or --new-major` it will create a new major version for the block and a corresponding git branch.

_Protip_: `element publish -n "A NAME TO DISPLAY TO USERS" -c "OPTIONAL CATEGORY"`
_Protip_: `element publish -m`

* * *

Expand All @@ -60,6 +67,26 @@ _Protip_: `element update -p`

* * *

### `element release`

When you are ready to push your block live you can use this command.

### `element release --note "release note for the block`

There's only one optional flag for this command, and it's to add a release note to your block

_Protip_: `element update -n "release note for the block"`

* * *

### `element rollback`

If you have a problem with a release you can rollback to a previous release. The current release will be moved back to staging and the previous release will become active. If you rollback again it will remove the release from staging. You can continue to rollback until you only have your original release.

Each major version can be rolled back individually. However, you won't be able to rollback the inital published major version of the block.

* * *

### Adding a Thumbnail

Create a PNG file, ideally less than 100 kb in size, and save it in the root directory of the block as `thumbnail.png.` When publishing or updating your block, this file will be saved and then be shown in the Volusion store admin's [Site Designer](https://admin.volusion.com/designer).
Expand Down
3 changes: 2 additions & 1 deletion jest-unit.config.json
@@ -1,7 +1,8 @@
{
"moduleFileExtensions": [
"ts",
"js"
"js",
"json"
],
"moduleDirectories": [
"node_modules",
Expand Down

0 comments on commit 26fdd36

Please sign in to comment.