From b28ac258c7cde001b09126ce1486b4485b729e26 Mon Sep 17 00:00:00 2001 From: Keanu Lee Date: Thu, 13 Sep 2018 11:28:25 -0700 Subject: [PATCH] Update README; remove bower.json --- README.md | 89 +++++++++++++++--------------------------------------- bower.json | 27 ----------------- 2 files changed, 25 insertions(+), 91 deletions(-) delete mode 100644 bower.json diff --git a/README.md b/README.md index 69b079f7..7782006b 100644 --- a/README.md +++ b/README.md @@ -1,77 +1,38 @@ # SHOP -## Prerequisites +Shop is a sample e-commerce [Progressive Web App](https://developers.google.com/web/progressive-web-apps/). -### Polymer CLI +![shop screenshot](https://user-images.githubusercontent.com/116360/39545341-c50a9184-4e05-11e8-88e0-0e1f3fa4834b.png) -Install [polymer-cli](https://github.com/Polymer/polymer-cli): +## Features/highlights - npm install -g polymer-cli +- a sample e-commerce shopping site +- pattern for a real-life shopping cart and store checkout flow +- pattern for using custom announcers for accessibility -### Setup - - # Using CLI - mkdir shop - cd shop - polymer init shop - - # Or cloning direct from GitHub - git clone https://github.com/Polymer/shop.git - cd shop - bower install - -## Start the development server - - polymer serve - -## Run web-component-tester tests - - polymer test +## Setup +```bash +$ git clone https://github.com/Polymer/shop.git +$ cd shop +$ npm i +$ npm start +``` ## Build - -Build presets provide an easy way to define common build configurations in your `polymer.json` file. There are 3 build presets we put in `polymer.json` file in Shop: - -**es5-bundled** - -- js: {minify: true, compile: true} -- css: {minify: true} -- html: {minify: true} -- bundle: true -- addServiceWorker: true -- addPushManifest: true -- insertPrefetchLinks: true - -**es6-unbundled** - -- js: {minify: true, compile: false} -- css: {minify: true} -- html: {minify: true} -- bundle: false -- addServiceWorker: true -- addPushManifest: true -- insertPrefetchLinks: true - -**es6-bundled** - -- js: {minify: true, compile: false} -- css: {minify: true} -- html: {minify: true} -- bundle: true -- addServiceWorker: true -- addPushManifest: true -- insertPrefetchLinks: true - -Run the command to build the presets: - - polymer build +```bash +$ npm run build +``` ## Test the build - -Use `polymer serve` to serve a specific build preset of the app. For example: - - polymer serve build/es5-bundled +To test prpl-server build: +```bash +$ npm run serve:prpl-server +``` +To test static build: +```bash +$ npm run serve:static +``` ## Deploying -Our [production deployment of SHOP](https://shop.polymer-project.org/) is hosted on App Engine with Node.js. You can examine its configuration on the [app-engine-node branch](https://github.com/Polymer/shop/tree/app-engine-node) of this repository and [compare it with the master branch](https://github.com/Polymer/shop/pull/145). +Our [production deployment of SHOP](https://shop.polymer-project.org/) is hosted on App Engine with Node.js. It can be deployed with [the same steps as PWA Starter Kit](https://polymer.github.io/pwa-starter-kit/building-and-deploying/#deploying-prpl-server). diff --git a/bower.json b/bower.json deleted file mode 100644 index 34b71f63..00000000 --- a/bower.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "shop", - "version": "2.0.0", - "authors": [ - "The Polymer Authors" - ], - "private": true, - "dependencies": { - "polymer": "polymer/polymer#^2.0.0", - "app-layout": "polymerelements/app-layout#^2.0.0", - "app-route": "polymerelements/app-route#^2.0.0", - "app-storage": "polymerelements/app-storage#^2.0.0", - "iron-flex-layout": "polymerelements/iron-flex-layout#^2.0.0", - "iron-form": "polymerelements/iron-form#^2.0.0", - "iron-icon": "polymerelements/iron-icon#^2.0.0", - "iron-iconset-svg": "polymerelements/iron-iconset-svg#^2.0.0", - "iron-media-query": "polymerelements/iron-media-query#^2.0.0", - "iron-overlay-behavior": "polymerelements/iron-overlay-behavior#^2.0.0", - "iron-pages": "polymerelements/iron-pages#^2.0.0", - "iron-selector": "polymerelements/iron-selector#^2.0.0", - "paper-icon-button": "polymerelements/paper-icon-button#^2.0.0", - "paper-spinner": "polymerelements/paper-spinner#^2.0.0" - }, - "devDependencies": { - "web-component-tester": "^6.0.0" - } -}