Commands for roc

October 14, 2016 ยท View on GitHub

General Information

All commands can be called with some additional options illustrated in the table below.

General options

NameDescriptionRequired
-b, --better-feedbackEnables source-map-support and loud-rejection.No
-c, --configPath to configuration file.No
-d, --directoryPath to working directory.No
-h, --helpOutput usage information.No
-V, --verboseEnable verbose mode.No
-v, --versionOutput version number.No

Commands

lock

Locks down Roc dependencies to fixed alpha versions.

roc lock

Defined by extensions

roc

create

Project creation

roc create <command>

Commands that can be used to create new projects.

init

Init a new project.

roc create init [template] [version]

The init command can be used to initiate a new Roc project and currently expects that it is run inside an empty directory. As shown above it takes two optional arguments, template and version. If no template is given a prompt will be displayed with the possible alternatives that exist. Currently these alternatives are coded into Roc and matches web-app and web-app-react.

template Template can either be a short name for a specific template, currently it accepts web-app and web-app-react that will be converted internally to rocjs/roc-template-web-app and rocjs/roc-template-web-app-react. The actual template reference is a GitHub repo and can be anything matching that pattern USERNAME/PROJECT.

The template can also point to a local zip file (ending in .zip) of a template repository. This is useful if the template is in a private repo or not available on GitHub.

It will also expect that the template has a folder named template that contains a package.json file with at least one dependency to a Roc package following the pattern roc-package-* or that it has a roc.config.js file (this file is then expected to have some packages defined but this is not checked immediately).

version Versions should match a tag on the GitHub repo and will default to master if none exists. When providing an input on the command line Roc will automatically add v in front of versions that starts with a number to match GitHub default conventions that have version tags that start with v like v1.0.0. master is also always available as an option.

Arguments

NameDescriptionDefaultTypeRequiredCan be empty
templateThe template to use.FilepathNoNo
versionThe version of the template to use.StringNoNo

Command options

NameDescriptionDefaultTypeRequiredCan be empty
--cloneIf git clone should be used when downloading the template.BooleanNo
-f, --forceIgnore non empty directory warning.BooleanNo
-l, --list-versionsList the available versions of a template.BooleanNo

Defined by extensions

roc

new

Create a new project.

roc create new <name> [template] [version]

Alias for "init" that always will try to create a new directory.

Arguments

NameDescriptionDefaultTypeRequiredCan be empty
nameName for a new directory to create the project in.StringYesNo
templateThe template to use.FilepathNoNo
versionThe version of the template to use.StringNoNo

Command options

NameDescriptionDefaultTypeRequiredCan be empty
--cloneIf git clone should be used when downloading the template.BooleanNo
-f, --forceIgnore non empty directory warning.BooleanNo
-l, --list-versionsList the available versions of a template.BooleanNo

Defined by extensions

roc

meta

Meta commands

roc meta <command>

Meta commands that can be used to generate meta data about the current project.

docs

Generates documentation for the current project.

roc meta docs

Command options

NameDescriptionDefaultTypeRequiredCan be empty
--htmlIf HTML should be generated. (Not supported yet)falseBooleanNo
--markdownIf markdown should be generated.trueBooleanNo
--modeThe platform that is to be used, for link generation."github.com"`/github.comnodejs.orgbitbucket.org
--outputA directory to place the generated documentation inside of."docs"StringNoNo
--projectIf the projects configuration and actions should be included.falseBooleanNo

Defined by extensions

roc

list-settings

Prints all the available settings that can be changed.

roc meta list-settings

Defined by extensions

roc