Prepare mwc-formfield for release

- Mark non-releasable packages with `private: true`
- Make sure all packages have a proper `publishConfig` for when they can
be released
This commit is contained in:
Daniel Freedman 2018-05-10 11:12:41 -07:00
parent 56b404cdfd
commit 82e15bf72e
17 changed files with 142 additions and 22 deletions

16
package-lock.json generated
View File

@ -1332,16 +1332,16 @@
"resolved": "https://registry.npmjs.org/@polymer/lit-element/-/lit-element-0.4.0.tgz",
"integrity": "sha512-fDnr66sBW2FtNAueCfk6YCw6D63ai8p3mutVCD/phrlWlbI34wliAAZWC7/5PfZYNUaGaEg65jEVyf/UeNE4Gg==",
"requires": {
"@polymer/polymer": "3.0.0-pre.13",
"@polymer/polymer": "3.0.2",
"lit-html": "0.9.0"
}
},
"@polymer/polymer": {
"version": "3.0.0-pre.13",
"resolved": "https://registry.npmjs.org/@polymer/polymer/-/polymer-3.0.0-pre.13.tgz",
"integrity": "sha512-dUoguCkr4XFVQ3WT4Kpc/Mkmqfo0CPj355uvF8n4hQWraJXxQI/f41fLTiXRHhwpZwe+ZMZ48Z5YkG/5Wzlmjw==",
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@polymer/polymer/-/polymer-3.0.2.tgz",
"integrity": "sha512-ow8AAjTe9ps8bantY9IvL0PT+xHf5VN3Cjahfr7gBJAc0lv3jTwGBv7pso65SHyrUJEEHeakhx6iPMl7qY4tfw==",
"requires": {
"@webcomponents/shadycss": "1.2.0-0"
"@webcomponents/shadycss": "1.2.1"
}
},
"@types/acorn": {
@ -1682,9 +1682,9 @@
}
},
"@webcomponents/shadycss": {
"version": "1.2.0-0",
"resolved": "https://registry.npmjs.org/@webcomponents/shadycss/-/shadycss-1.2.0-0.tgz",
"integrity": "sha512-NShZ8DRiPnsBFpbbhITL5KZd47cU0v8paRc3F5I/TkC7MX/UtUEvvmQN6ghffb4oNVTC3Aqt95vK2JFaFgDLtw=="
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@webcomponents/shadycss/-/shadycss-1.2.1.tgz",
"integrity": "sha512-ZnjFb1Wf81CqMgs1dbT6JT6N4nY32bs2r5YC/5GSIb/ozJGR+UYs3ldJxtk1v5uZzPRIsAWv7wYSJcCp6ml8+A=="
},
"@webcomponents/webcomponentsjs": {
"version": "2.0.0-0",

View File

@ -14,5 +14,9 @@
"devDependencies": {
"@material/card": "^0.35.0",
"@material/mwc-sass-render": "^0.0.1"
}
},
"publishConfig": {
"access": "public"
},
"private": true
}

View File

@ -16,5 +16,9 @@
},
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1"
}
},
"publishConfig": {
"access": "public"
},
"private": true
}

View File

@ -18,5 +18,9 @@
},
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1"
}
},
"publishConfig": {
"access": "public"
},
"private": true
}

View File

@ -0,0 +1,61 @@
# mwc-formfield
A [Material Components](https://material.io/components/) formfield implementation using [Web Components](https://www.webcomponents.org/introduction)
## Getting started
* The easiest way to try out mwc-formfield is to use one of these online tools:
* Runs in all [supported](#supported-browsers) browsers: [StackBlitz](https://stackblitz.com/edit/mwc-icon-example?file=index.js), [Glitch](https://glitch.com/edit/#!/mwc-icon-example?path=index.html)
* Runs in browsers with [JavaScript Modules](https://caniuse.com/#search=modules): [JSBin](http://jsbin.com/qibisux/edit?html,output),
[CodePen](https://codepen.io/azakus/pen/deZLja).
* You can also copy [this HTML file](https://gist.githubusercontent.com/azakus/f01e9fc2ed04e781ad5a52ded7b296e7/raw/266f2f4f91cbfe89b2acc6ec63957b1a3cfe9b39/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-formfield 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-formfield to your project:
```npm i @material/mwc-formfield```
1. Import the mwc-formfield definition into your HTML page:
```<script type="module" src="@material/mwc-formfield/mwc-formfield.js"></script>```
Or into your module script:
```import {Formfield} from "@material/mwc-formfield"```
1. Create an instance of mwc-formfield in your HTML page, or via any framework that [supports rendering Custom Elements](https://custom-elements-everywhere.com/):
```<mwc-formfield>sentiment_very_satisfied</mwc-formfield>```
1. Install the Polymer CLI:
```npm i -g polymer-cli```
1. Run the development server and open a browser pointing to its URL:
```polymer serve```
> mwc-formfield is published on [npm](https://www.npmjs.com/package/@material/mwc-formfield) 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-formfield 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-formfield.
## 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

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

View File

@ -16,5 +16,9 @@
},
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1"
}
},
"publishConfig": {
"access": "public"
},
"private": true
}

View File

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

View File

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

View File

@ -17,5 +17,9 @@
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1",
"@material/typography": "^0.35.0"
}
},
"publishConfig": {
"access": "public"
},
"private": true
}

View File

@ -15,5 +15,9 @@
"command-line-args": "^5.0.2",
"command-line-usage": "^5.0.4",
"node-sass": "^4.8.3"
}
},
"publishConfig": {
"access": "public"
},
"private": true
}

View File

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

View File

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

View File

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

View File

@ -16,5 +16,9 @@
},
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1"
}
},
"publishConfig": {
"access": "public"
},
"private": true
}

View File

@ -16,5 +16,9 @@
},
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1"
}
},
"publishConfig": {
"access": "public"
},
"private": true
}

View File

@ -15,5 +15,9 @@
"devDependencies": {
"@material/mwc-sass-render": "^0.0.1",
"@material/typography": "^0.35.0"
}
},
"publishConfig": {
"access": "public"
},
"private": true
}