Questions tagged [polymer-cli]

The Polymer CLI is a command line interface for building, managing and deploying Polymer applications.

Polymer CLI is a command-line interface for projects. It includes a build pipeline, a boilerplate generator for creating elements and apps, a linter, a development server, and a test runner.

Polymer CLI works with two types of projects:

  • Elements projects. In an element project, you expose a single element or group of related elements which you intend to use in other element or app projects, or distribute on a registry like Bower or NPM. Elements are reusable and organized to be used alongside other elements, so components are referenced outside the project.

  • Application projects. In an app project, you build an application, composed of Polymer elements, which you intend to deploy as a website. Applications are self-contained, organized with components inside the application.

For more information, see the project documentation or the GitHub project page.

76 questions
2
votes
1 answer

Polymer CLI: build component page

Using polymer init you can create an element project and using polymer serve you can serve the component page (showing docs and demo). To serve it, Polymer CLI does some path remapping because the import tags do not match the project structure.…
pomber
  • 23,132
  • 10
  • 81
  • 94
2
votes
1 answer

npm install -g polymer-cli is failing, saying package not available

I am trying to install polymer-cli, I am getting the below error. [copying from error logs] npm install -g polymer-cli My node and npm versions are as... node v4.4.3 npm v3.10.6 Can anyone please suggest how do I resolve the issue, or I have to…
2
votes
1 answer

Build a static site with polymer-cli

Ok I'm new to Polymer, after seeing the main page and Google IO 2016 video, I wanted to try it out, and right now I created a basic web application with it. I managed to get it build and running it through the "polymer serve" command, but now that I…
Raul G
  • 473
  • 1
  • 6
  • 18
1
vote
1 answer

Using `polymer serve` with local API server

I want to use polymer serve to serve my LitElement app during development without waiting for polymer build to finish after every change. However, the app uses relative URLs for API access, like GET /api/api_method, and AFAIK I can't make polymer…
EvilTosha
  • 157
  • 11
1
vote
0 answers

Add a Webpack 'loader' to `polymer build`

Is there any way to add a Webpack loader to Polymer 3.0's build and serve CLI? I'm familiar with using Webpack to build Polymer apps, but not with the Polymer CLI — I didn't find a public interface, but I didn't look for long.
Lee Goddard
  • 10,680
  • 4
  • 46
  • 63
1
vote
1 answer

polymer serve vs. static web server

What kind of magic is polymer-serve doing that I don't get with a simple, static web server? I just started with a simple "hello world" project. When I run polymer serve I'm able to browse to the page at http://localhost:8000/example.html and it…
Patrick McElhaney
  • 57,901
  • 40
  • 134
  • 167
1
vote
1 answer

Can webpack works like polymer cli?

I am studying Lit element and Material Design Component(MDC). For MDC, I have to use webpack-dev-server as getting started says. But For Lit element, I have to use Polyemr cli because Polymer Cli can import libraries by name. like this. import {…
L.Yun
  • 31
  • 4
1
vote
0 answers

why is Git necessary to install Polymer-CLI

Polymer's official documentation for Polymer-CLI installation instructs to "Ensure that Git is installed." Why is Git required? What if it's not my default VCS? Doc referenced: https://www.polymer-project.org/3.0/docs/tools/polymer-cli
1
vote
0 answers

polymer test -l chrome: Could not request headers from https://download.microsoft.com

I am following simple steps to run polymer test but I am facing issues (https://www.polymer-project.org/1.0/docs/tools/tests). There are few questions in stackoverflow not answered about similar issue. Polymer Tests fail waiting for the driver…
Jim C
  • 3,957
  • 25
  • 85
  • 162
1
vote
1 answer

How to install Polymer 1.x templates with polymer-cli

When I run polymer init, it only shows V2 templates, but I want V1. How do I install Polymer 1.x application/element templates?
1
vote
1 answer

How to customize polymer serve with default welcome file

Various webservers allow the configuration of welcome files, so that when an URL points to a directory and the directory contains an index.html file, that file is being served. Can I configure polymer serve so that it also serves index.html files…
Markus
  • 668
  • 7
  • 27
1
vote
1 answer

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?
Markus
  • 668
  • 7
  • 27
1
vote
0 answers

Polymer CLI --env type global option from application

There is a --env type global option available for polymer cli. I'm looking for way to use dev environment specific code that doesn't compile into production application. Is there a way to access --env type from application? or any other workaround ?
prasadmadanayake
  • 1,415
  • 15
  • 23
1
vote
1 answer

polymer build needs github connection

When i am trying to build my polymer application via polymer-cli, it tries to connect to github. But i have already downloaded and installed all dependencies and application runs without any issue with polymer serve. I want to build the polymer app…
dilan.sp
  • 41
  • 1
  • 6
1
vote
1 answer

"polymer build" inconsistently copies extraDependencies

I'm using polymer-cli 1.5.7 on different projects. In some projects, the extraDependencies "client/bower_components/webcomponentsjs/*.js" copies all 8 JS files into build/es5-bundled, build/es6-bundled, and build/es6-unbundled. In another very…
Thad
  • 898
  • 13
  • 24