The static content deployment tool has been significantly changed in Magento 2.2

Details:

Option Description Required?
<lang>

List of ISO-636 language codes for which to output static view files. (Default is en_US.)

You can find the list by running magento info:language:list.

No

--language (-l)

Generate files only for the specified languages. The default, with no option specified, is to generate files for all ISO-636 language codes. You can specify the name of one language code at a time.

For example, --language en_US --language es_ES

No

--exclude-language

Generate files for the specified language codes. The default, with no option specified, is to exclude nothing. You can specify the name of one language code or a comma-separated list of language codes.

No

--theme <theme>

Themes for which to deploy static content.

For example, --theme Magento/blank --theme Magento/luma

No

--exclude-theme <theme>

Themes to exclude when deploying static content.

For example, --exclude-theme Magento/blank --theme Magento/luma

No

--area (-a)

Generate files only for the specified areas. The default, with no option specified, is to generate files for all areas. Valid values are adminhtml and frontend.

For example, --area adminthml

No

--exclude-area

Do not generate files for the specified areas. The default, with no option specified, is to exclude nothing.

No

--jobs (-j)

Enable parallel processing using the specified number of jobs. The default is 4. To cause the task to run in one process (for example, if your system does not support process forking), use --jobs 1.

No

--no-javascript

Do not deploy JavaScript files

No

--no-css

Do not deploy CSS files.

No

--no-less

Do not deploy LESS files.

No

--no-images Do not deploy images.

No

--no-fonts

Do not deploy font files.

No

--no-html

Do not deploy HTML files.

No

--no-misc

Do not deploy other types of files (that is .md, .jbf, .csv, .json, .txt, .htc, or .swf files).

No

--no-html-minify

Do not minify HTML files.

No

--dry-run (-d)

Include to view the files output by the tool without outputting anything.

No

-s Define the deployment strategy. Use these options only if you have more than one locale.

Use the quick strategy. To conserve disk space on the server, use the compact strategy>.

By default, the quick strategy is used.

  </td>
  <td>
    <p>
      No
    </p>
  </td>
</tr>
<tr>
  <td>
    --force (-f)
  </td>
  <td>
    <p>
      Deploy files in any mode. (by default, the static content
      content deployment tool can be run only in production
      mode. Use this option to run it in default or developer
      mode).
    </p>
  </td>
  <td>
    <p>
      No
    </p>
  </td>
</tr>

Examples

Following are some example commands.

Excluding a theme and HTML minification

The following command deploys static content for the US English (en_US) language, excludes the Luma theme provided with Magento, and does not minify HTML files.

magento setup:static-content:deploy en_US --exclude-theme Magento/luma --no-html-minify

Sample output:

Requested languages: en_US
Requested areas: frontend, adminhtml
Requested themes: Magento/blank, Magento/backend
=== frontend -> Magento/blank -> en_US ===
=== adminhtml -> Magento/backend -> en_US ===
...........................................................
... more ...
Successful: 2055 files; errors: 0
---

New version of deployed files: 1466710645
............
Successful: 1993 files; errors: 0
---

Generating static view files for one theme and one area

The following command generates static view files for all languages, the frontend area only, the Magento Luma theme only, without generating fonts:

magento setup:static-content:deploy --area frontend --no-fonts --theme Magento/luma

Sample output:

Requested languages: en_US
Requested areas: frontend
Requested themes: Magento/luma
=== frontend -> Magento/luma -> en_US ===
...........................................................
... more ...
........................................................................
Successful: 2092 files; errors: 0
---

New version of deployed files: 1466711110

See also:

The compact web asset generation strategy has been added to Magento 2.2