1 | @percy/agent
|
2 | ============
|
3 |
|
4 | A low-level Node process for interacting with Percy.
|
5 |
|
6 | [![Version](https://img.shields.io/npm/v/@percy/agent.svg)](https://npmjs.org/package/@percy/agent)
|
7 | [![CircleCI](https://circleci.com/gh/percy/percy-agent/tree/master.svg?style=shield)](https://circleci.com/gh/percy/percy-agent/tree/master)
|
8 | [![Downloads/week](https://img.shields.io/npm/dw/@percy/agent.svg)](https://npmjs.org/package/@percy/agent)
|
9 | [![License](https://img.shields.io/npm/l/@percy/agent.svg)](https://github.com/percy/percy-agent/blob/master/package.json)
|
10 |
|
11 |
|
12 | * [Usage](#usage)
|
13 | * [Commands](#commands)
|
14 |
|
15 | # Usage
|
16 |
|
17 | ```sh-session
|
18 | $ npm install -g @percy/agent
|
19 | $ percy COMMAND
|
20 | running command...
|
21 | $ percy (-v|--version|version)
|
22 | @percy/agent/0.4.9 linux-x64 node-v10.15.3
|
23 | $ percy --help [COMMAND]
|
24 | USAGE
|
25 | $ percy COMMAND
|
26 | ...
|
27 | ```
|
28 |
|
29 | # Commands
|
30 |
|
31 | * [`percy exec`](#percy-exec)
|
32 | * [`percy finalize`](#percy-finalize)
|
33 | * [`percy help [COMMAND]`](#percy-help-command)
|
34 | * [`percy snapshot SNAPSHOTDIRECTORY`](#percy-snapshot-snapshotdirectory)
|
35 |
|
36 | ## `percy exec`
|
37 |
|
38 | Start and stop Percy around a supplied command.
|
39 |
|
40 | ```
|
41 | USAGE
|
42 | $ percy exec
|
43 |
|
44 | OPTIONS
|
45 | -p, --port=port [default: 5338] port
|
46 | -t, --network-idle-timeout=network-idle-timeout [default: 50] asset discovery network idle timeout (in milliseconds)
|
47 |
|
48 | EXAMPLES
|
49 | $ percy exec -- echo "percy is running around this echo command"
|
50 | $ percy exec -- bash -c "echo foo && echo bar"
|
51 | ```
|
52 |
|
53 | _See code: [dist/commands/exec.ts](https://github.com/percy/percy-agent/blob/v0.4.9/dist/commands/exec.ts)_
|
54 |
|
55 | ## `percy finalize`
|
56 |
|
57 | Finalize a build. Commonly used for parallelized builds, especially when the number of parallelized processes is unknown.
|
58 |
|
59 | ```
|
60 | USAGE
|
61 | $ percy finalize
|
62 |
|
63 | OPTIONS
|
64 | -a, --all (required)
|
65 |
|
66 | EXAMPLE
|
67 | $ percy finalize --all
|
68 | [percy] Finalized parallel build.
|
69 | ```
|
70 |
|
71 | _See code: [dist/commands/finalize.ts](https://github.com/percy/percy-agent/blob/v0.4.9/dist/commands/finalize.ts)_
|
72 |
|
73 | ## `percy help [COMMAND]`
|
74 |
|
75 | display help for percy
|
76 |
|
77 | ```
|
78 | USAGE
|
79 | $ percy help [COMMAND]
|
80 |
|
81 | ARGUMENTS
|
82 | COMMAND command to show help for
|
83 |
|
84 | OPTIONS
|
85 | --all see all commands in CLI
|
86 | ```
|
87 |
|
88 | _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.1.6/src/commands/help.ts)_
|
89 |
|
90 | ## `percy snapshot SNAPSHOTDIRECTORY`
|
91 |
|
92 | Snapshot a directory containing a pre-built static website.
|
93 |
|
94 | ```
|
95 | USAGE
|
96 | $ percy snapshot SNAPSHOTDIRECTORY
|
97 |
|
98 | ARGUMENTS
|
99 | SNAPSHOTDIRECTORY A path to the directory you would like to snapshot
|
100 |
|
101 | OPTIONS
|
102 | -b, --base-url=base-url [default: /] If your static files will be hosted in a subdirectory,
|
103 | instead
|
104 | of the webserver's root path, set that subdirectory with this flag.
|
105 |
|
106 | -i, --ignore-files=ignore-files Glob or comma-seperated string of globs for matching the files and
|
107 | directories to ignore.
|
108 |
|
109 | -p, --port=port [default: 5338] Port
|
110 |
|
111 | -s, --snapshot-files=snapshot-files [default: **/*.html,**/*.htm] Glob or comma-seperated string of globs
|
112 | for matching the files and directories to snapshot.
|
113 |
|
114 | -t, --network-idle-timeout=network-idle-timeout [default: 50] Asset discovery network idle timeout (in milliseconds)
|
115 |
|
116 | EXAMPLES
|
117 | $ percy snapshot _site/
|
118 | $ percy snapshot _site/ --base-url "/blog"
|
119 | $ percy snapshot _site/ --ignore-files "/blog/drafts/**"
|
120 | ```
|
121 |
|
122 | _See code: [dist/commands/snapshot.ts](https://github.com/percy/percy-agent/blob/v0.4.9/dist/commands/snapshot.ts)_
|
123 |
|