|
1 | | -# docker-cli |
| 1 | +# Outrigger cli |
| 2 | + |
| 3 | +> Docker image adding pa11y and other common tools to [Docksal CLI](https://github.com/docksal/service-cli). |
| 4 | +
|
| 5 | +[](https://github.com/phase2/docker-cli) [](https://hub.docker.com/r/outrigger/cli) [](https://hub.docker.com/r/outrigger/cli) [](https://microbadger.com/images/outrigger/cli:dev "Get your own image badge on microbadger.com") |
| 6 | + |
| 7 | +This Docker image adds the following tools to the docksal/cli image: |
| 8 | +* [pa11y v5](https://github.com/pa11y/pa11y) |
| 9 | +* [puppeteer v1.2](https://github.com/puppeteer/puppeteer) (needs testing with v2.x) |
| 10 | +* vim |
| 11 | + |
| 12 | +## Using pa11y with Docksal |
| 13 | + |
| 14 | +In the project `.docksal/docksal.env` set the following: |
| 15 | + |
| 16 | +``` |
| 17 | +CLI_IMAGE='outrigger/cli' |
| 18 | +``` |
| 19 | + |
| 20 | +Then start your project with `fin start`. Once the containers have started, run |
| 21 | +the webpack-dev-server for your theme: |
| 22 | + |
| 23 | +``` |
| 24 | +cd THEME_PATH |
| 25 | +fin exec npm run theme |
| 26 | +``` |
| 27 | +where the `theme` job is defined in `package.json` as: |
| 28 | +``` |
| 29 | +scripts: |
| 30 | + "theme": "cross-env-shell NODE_ENV=development \"webpack-dev-server --config ./webpack.config.js --hot\"", |
| 31 | +``` |
| 32 | + |
| 33 | +This will use your webpack config and enter watch mode to recompile when changes |
| 34 | +are detected to your theme files. |
| 35 | + |
| 36 | +Once the theme has compiled and the webpack-dev-server is running, execute pa11y |
| 37 | +tests via: |
| 38 | + |
| 39 | +``` |
| 40 | +fin exec npm run pa11y |
| 41 | +``` |
| 42 | +where the `pa11y` job is defined in `package.json` as: |
| 43 | +``` |
| 44 | +scripts: |
| 45 | + "pa11y": "pa11y-ci --config pa11y.js" |
| 46 | +``` |
| 47 | + |
| 48 | +## Resources |
| 49 | + |
| 50 | +* General questions on Docksal should go to the [docksal documenation](https://docs.docksal.io/) |
| 51 | +* General issues on Puppeteer should check out the [base Puppeteer image](https://hub.docker.com/r/alekzonder/puppeteer/). Note: you can follow the instructions in that README to take screenshots. Since this image is based on that, you should not need a further Docker iamge download. |
| 52 | +* [Puppeteer Github Project](https://github.com/GoogleChrome/puppeteer) |
| 53 | +* [Official Puppeteer Docker guidance](https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker) |
| 54 | +* [pa11y @ Github](https://github.com/pa11y/pa11y) |
| 55 | + |
| 56 | +## Security Reports |
| 57 | + |
| 58 | +Please email [email protected] with security concerns. |
| 59 | + |
| 60 | +## Maintainers |
| 61 | + |
| 62 | +[](https://www.phase2technology.com) |
0 commit comments