1.0.5 • Published 5 years ago
@hurl/cli v1.0.5
Table of Contents
Installation
Using npm:
npm install -g @hurl/cliUsing yarn:
yarn global add @hurl/cliCommands
init
Initialize Hurl
Options
--skip: Skip prompts and create default config- Type:
boolean - Default: false
- Alias:
-s
- Type:
--examples: Include example templates when creating config- Type:
boolean - Default: true
- Alias:
-e
- Type:
Examples
Basic (with prompts & examples)
$ hurl initResulting folder structure:
project │ └───.hurl │ │ .hurl.<js|json|yml|ts> │ │ │ └───templates │ │ <language>-example.<js|ts> │ │ <language>-example.<js|ts> │ │ ...Skip prompts
$ hurl init -s $ hurl init --skip $ hurl init --skip=trueResulting folder structure:
project │ └───.hurl │ │ .hurl.json │ │ │ └───templates │ │ <empty>Don't create example templates
$ hurl init -e=false $ hurl init --examples=false $ hurl init --no-examplesResulting folder structure:
project │ └───.hurl │ │ .hurl.<js|json|yml|ts> │ │ │ └───templates │ │ <empty>
generate
Generate files from a template
Options
--paths: The paths to the new files- Type:
string[] - Alias:
-p - Required
- Type:
--template: The name of the template file/folder- Type:
string - Alias:
-t - Required
- Type:
--confirm: Should confirm when overriding an existing file- Type:
boolean - Default: true
- Type:
--<some-variable-name>: Value for some template variable- Type:
string
- Type:
Examples
Create single file with no variables
$ hurl generate -p example.js -t template.jsCreate multiple files with no variables
$ hurl generate -p example.js example2.js -t template.jsCreate files with variables
$ hurl generate -p example.js -t example.js --var=value