Polymer / pwa-starter-kit

Starter templates for building full-featured Progressive Web Apps from web components.
https://pwa-starter-kit.polymer-project.org
2.36k stars 431 forks source link

[Template] Usage of @pika/web #339

Closed krumware closed 4 years ago

krumware commented 5 years ago

Add a sample template that uses @pika/web for convenient web module imports.

krumware commented 5 years ago

Hi folks! We have a branch ready for this, if a template-pika-web branch can be created here I can open a pull request against it. https://github.com/krumIO/pwa-starter-kit/tree/template-pika-web

krumware commented 5 years ago

When running npm run build we do see some warning flags thrown, but looking at these in action may provide good feedback for both Lit and Pika:

C:\scrubbed\pwa-starter-kit [pika-web +0 ~1 -0 !]> npm run build

> pwa-starter-kit@0.9.0 build scrubbed\pwa-starter-kit
> polymer build --auto-base-path && gulp prpl-server

info:   Clearing build\ directory...

    window.customElements.define(tagName, clazz);
                                 ~~~~~~~

file:///scrubbed/pwa-starter-kit/web_modules/lit-element.js(1985,34) warning [cant-determine-element-tagname] - Unable to evaluate this expression down to a definitive string tagname.

            window.customElements.define(tagName, clazz);
                                         ~~~~~~~

file:///scrubbed/pwa-starter-kit/web_modules/lit-element.js(2001,42) warning [cant-determine-element-tagname] - Unable to evaluate this expression down to a definitive string tagname.

const connect = (store) => (baseElement) => class extends baseElement {
                                                          ~~~~~~~~~~~

file:///scrubbed/pwa-starter-kit/web_modules/pwa-helpers.js(25,59) warning [could-not-resolve-reference] - Could not resolve reference to class
info:   (esm-bundled) Building...
info:   (es6-bundled) Building...
info:   (es5-bundled) Building...
info:   (es5-bundled) Build complete!
info:   (esm-bundled) Build complete!
info:   (es6-bundled) Build complete!
[17:56:32] Using gulpfile C:\scrubbed\pwa-starter-kit\gulpfile.js
[17:56:32] Starting 'prpl-server'...
[17:56:32] Starting 'prpl-server:clean'...
[17:56:32] Finished 'prpl-server:clean' after 27 ms
[17:56:32] Starting 'prpl-server:build'...
[17:56:33] Finished 'prpl-server:build' after 307 ms
[17:56:33] Finished 'prpl-server' after 340 ms
C:\scrubbed\pwa-starter-kit [pika-web +0 ~1 -0 !]> npm run serve

> pwa-starter-kit@0.9.0 serve C:\scrubbed\pwa-starter-kit
> prpl-server --root server/build

Loading config from "server\build\polymer.json".
Serving files from "C:\scrubbed\pwa-starter-kit\server\build".
Detected push manifest "esm-bundled\push-manifest.json".
Detected push manifest "es6-bundled\push-manifest.json".
Detected push manifest "es5-bundled\push-manifest.json".
Registered entrypoint "esm-bundled/index.html" with capabilities [es2015,modules].
Registered entrypoint "es6-bundled/index.html" with capabilities [es2015].
Registered entrypoint "es5-bundled/index.html" with capabilities [].

prpl-server listening
http://127.0.0.1:8080
FredKSchott commented 5 years ago

This has my +1! :)

@krumware mind filing an issue in @pika/web so that we can take a look? I’m curious where that warning is even coming from, and what it is that @pika/web is trying to do that is causing it

krumware commented 5 years ago

Sure thing! I'll knock that out in the morning

frankiefu commented 5 years ago

This is awesome! Big fan of @pika/web and nice to see a version of pwa-starter-kit template using it. Instead of adding another template to the repo (see faq), we are going to keep this issue open so others can try out template-pika-web if they are interested.

krumware commented 5 years ago

Thanks @frankiefu!

If folks have feedback, happy to receive issues in the linked repo.

krumware commented 5 years ago

@frankiefu would you be ok if I renamed the issue [Template] Usage of @pika/web for clarity, and to remove the FR designation?

frankiefu commented 5 years ago

@krumware Sounds good. Thanks!

stale[bot] commented 4 years ago

This project is no longer under development and will be transitioning to a read-only repo. Thank you for your contributions.