Make sure access config is correct for publishing

Add READMEs to base and icon
This commit is contained in:
Daniel Freedman 2018-05-07 16:06:38 -07:00
parent 3e4214194f
commit 6483777bb8
10 changed files with 87 additions and 0 deletions

2
packages/base/README.md Normal file
View File

@ -0,0 +1,2 @@
# mwc-base
A suite of shared libraries and utility functions for [Material Components](https://material.io/components/)[Web Components](https://www.webcomponents.org/introduction)

View File

@ -9,5 +9,8 @@
"license": "Apache-2.0",
"dependencies": {
"@polymer/lit-element": "^0.4.0"
},
"publishConfig": {
"access": "public"
}
}

View File

@ -17,5 +17,8 @@
},
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1"
},
"publishConfig": {
"access": "public"
}
}

View File

@ -15,5 +15,8 @@
},
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1"
},
"publishConfig": {
"access": "public"
}
}

View File

@ -17,5 +17,8 @@
},
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1"
},
"publishConfig": {
"access": "public"
}
}

61
packages/icon/README.md Normal file
View File

@ -0,0 +1,61 @@
# mwc-icon
A [Material Components](https://material.io/components/) icon implementation using [Web Components](https://www.webcomponents.org/introduction)
## Getting started
* The easiest way to try out mwc-icon is to use one of these online tools:
* Runs in all [supported](#supported-browsers) browsers: [StackBlitz](https://stackblitz.com/edit/lit-element-example?file=index.js), [Glitch](https://glitch.com/edit/#!/hello-lit-element?path=index.html)
* Runs in browsers with [JavaScript Modules](https://caniuse.com/#search=modules): [JSBin](http://jsbin.com/zezilad/edit?html,output),
[CodePen](https://codepen.io/sorvell/pen/BxZgPN).
* You can also copy [this HTML file](https://gist.githubusercontent.com/sorvell/48f4b7be35c8748e8f6db5c66d36ee29/raw/2427328cf1ebae5077902a6bff5ddd8db45e83e4/index.html) into a local file and run it in any browser that supports [JavaScript Modules]((https://caniuse.com/#search=modules)).
* When you're ready to use mwc-icon in a project, install it via [npm](https://www.npmjs.com/). To run the project in the browser, a module-compatible toolctain is required. We recommend installing the [Polymer CLI](https://github.com/Polymer/polymer-cli) and using its development server as follows.
1. Ensure the webcomponents polyfills are included in your HTML page
- Install webcomponents polyfills
```npm i @webcomponents/webcomponentsjs```
- Add webcomponents polyfills to your HTML page
```<script src="@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>```
1. Add mwc-icon to your project:
```npm i @material/mwc-icon```
1. Import the mwc-icon definition into your HTML page:
```<script type="module" src="@material/mwc-icon/index.js"></script>```
Or into your module script:
```import {Icon} from "@material/mwc-icon"```
1. Create an instance of mwc-icon in your HTML page, or via any framework that [supports rendering Custom Elements](https://custom-elements-everywhere.com/):
```<mwc-icon>sentiment_very_satisfied</mwc-icon>```
1. Install the Polymer CLI:
```npm i -g polymer-cli@next```
1. Run the development server and open a browser pointing to its URL:
```polymer serve```
> mwc-icon is published on [npm](https://www.npmjs.com/package/@material/mwc-icon) using JavaScript Modules.
This means it can take advantage of the standard native JavaScript module loader available in all current major browsers.
>
> However, since mwc-icon uses npm convention to reference dependencies by name, a light transform to rewrite specifiers to URLs is required to get it to run in the browser. The polymer-cli's development server `polymer serve` automatically handles this transform.
Tools like [WebPack](https://webpack.js.org/) and [Rollup](https://rollupjs.org/) can also be used to serve and/or bundle mwc-icon.
## Supported Browsers
The last 2 versions of all modern browsers are supported, including
Chrome, Safari, Opera, Firefox, Edge. In addition, Internet Explorer 11 is also supported.

View File

@ -14,5 +14,8 @@
},
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1"
},
"publishConfig": {
"access": "public"
}
}

View File

@ -15,5 +15,8 @@
},
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1"
},
"publishConfig": {
"access": "public"
}
}

View File

@ -15,5 +15,8 @@
},
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1"
},
"publishConfig": {
"access": "public"
}
}

View File

@ -15,5 +15,8 @@
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1",
"@material/switch": "^0.35.0"
},
"publishConfig": {
"access": "public"
}
}