polymerpolymer-2.xpolymer-cli

Where does Polymer 2 CLI store variants?


When you have a Polymer 2 bower.json with dependency variants and run polymer install --variants, where does it store the variant dependent components?


Solution

  • The variants are stored in the same parent directory of the default bower_components/. For example, given variants named "variant-1" and "variant-2", the resulting directory structure of the command is:

    bower-variant-1.json
    bower-variant-2.json
    bower.json
    bower_components/
    bower_components-variant-1/
    bower_components-variant-2/
    

    You can find an example test fixture for the polymer install --variants command in polymer-cli source. Run the command in that directory to see the result described above.