@ticketmaster/allure-command

The official Allure CLI

Usage no npm install needed!

<script type="module">
  import ticketmasterAllureCommand from 'https://cdn.skypack.dev/@ticketmaster/allure-command';
</script>

README

@ticketmaster/allure-command

The official Allure CLI


This CLI tool take in charge the common tasks found in the Allure design system letting the projects developers more time to work on business value of their projects than reinventing the whell of redundant tasks.

Why use Allure Command?

Allure Command apply the Reusability, Uniformity and Simplicity principles of the Allure design system.

The goal of Allure Command is to standardize all the common tasks found in the Allure projects, centralize them into the Allure Command CLI and make them available to any developers who have to work on an Allure project.

Developers should not pass hours nor days to create and maintain a pipeline, set linting rules, adapt transpiling configuration nor write project maintenance scripts. Those common and repetitive tasks should be written one time, centralized at one place and accessible for every project.

This is why Allure Command exist.

Installation

You can install allure-command locally or globally.

To install it locally, inside a project, do this:

yarn add @ticketmaster/allure-command -D

Then to use it inside your project, you can do yarn allure [command] inside the project folder or allure [command] when used on the package.json scripts.

For examples

scripts: {
  build: "allure build",
  clean: "allure clean",
  reset: "allure clean -h",
}

You can also install it globally by doing this:

yarn global add @ticketmaster/allure-command

This way, the allure CLI will be available everywhere on your system.

However, you still need to install allure-command locally on your project. This way, the scripts inside your project using allure-command will work on others developers computers, CI runners and will be at the correct version.

Commands

You can type yarn allure --help to check the list of commands available.

Build

Usage: allure build [options]

Builds the app for production and create an archive with the result

Options:
  -f, --format <archiveFormat>  Archive format ("zip" or "tar")  (default: "tar")
  -p, --project <projectId>     Project ID
  -b, --build <buildId>         Build ID  (default: "local")
  -h, --help                    display help for command

This command is used to transpile the NextJS project into a static multiple-pages application (MPA), then create an archive with the resulting static files.

Clean

Usage: allure clean [options]

Remove the generated files and folders

Options:
  -f, --files <globPattern...>  Files and folders to remove (using glob pattern)
  -h, --hard                    Also remove node_modules
  --help                        display help for command

This command is used to remove commonly known files and folders generated by Allure projects as described below

- \*\*/\*.log
- public/config.ts
- .next/
- dist/
- build/
- artifacts/

You can also remove the node_modules folder by passing the -h or--hard option.

It's also possible to remove specific files and folders by passing the -f or--files option. That option accept a list of glob pattern. For example allure clean -f statics/**/*.min.js will remove all the files ending with .min.js at any folder level inside the folder statics.

It's a growing tool

As you see, allure-command currently don't have a lot of commands. This tool is pretty new and still growing. Code linting and formating, dependencies updates, tests toolings, CI toolings, project update scripts, project generation scripts and other features are expected to be added to the tools in the next months in order to help Allure project developers to be more efficient and to help them to keep Allure projects updated and aligned.