Skip to content

Commit

Permalink
Add TypeScript declarations to iron-icons. (#79)
Browse files Browse the repository at this point in the history
* Generate minimal package.json from bower.json
* Update and/or configure type declarations.
* Don't make types for util/
  • Loading branch information
aomarks authored Feb 24, 2018
1 parent f112ec2 commit 3e6294c
Show file tree
Hide file tree
Showing 20 changed files with 1,240 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ util/node_modules
material-design-icons
bower_components*
bower-*.json
node_modules
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ sudo: required
before_script:
- npm install -g polymer-cli
- polymer install --variants
- >-
npm run update-types && git diff --exit-code || (echo -e
'\n\033[31mERROR:\033[0m Typings are stale. Please run "npm run
update-types".' && false)
env:
global:
- secure: >-
Expand All @@ -20,6 +24,6 @@ addons:
script:
- xvfb-run polymer test
- >-
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then polymer test -s
'default'; fi
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then polymer test -s 'default';
fi
dist: trusty
12 changes: 12 additions & 0 deletions av-icons.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* av-icons.html
*/

/// <reference path="../iron-icon/iron-icon.d.ts" />

12 changes: 12 additions & 0 deletions communication-icons.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* communication-icons.html
*/

/// <reference path="../iron-icon/iron-icon.d.ts" />

26 changes: 26 additions & 0 deletions demo/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* demo/index.html
*/

/// <reference path="../../webcomponentsjs/webcomponents-lite.d.ts" />
/// <reference path="../../paper-styles/demo-pages.d.ts" />
/// <reference path="../../paper-styles/color.d.ts" />
/// <reference path="../../iron-meta/iron-meta.d.ts" />
/// <reference path="../iron-icons.d.ts" />
/// <reference path="../av-icons.d.ts" />
/// <reference path="../communication-icons.d.ts" />
/// <reference path="../device-icons.d.ts" />
/// <reference path="../editor-icons.d.ts" />
/// <reference path="../hardware-icons.d.ts" />
/// <reference path="../image-icons.d.ts" />
/// <reference path="../maps-icons.d.ts" />
/// <reference path="../notification-icons.d.ts" />
/// <reference path="../social-icons.d.ts" />
/// <reference path="../places-icons.d.ts" />

12 changes: 12 additions & 0 deletions device-icons.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* device-icons.html
*/

/// <reference path="../iron-icon/iron-icon.d.ts" />

12 changes: 12 additions & 0 deletions editor-icons.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* editor-icons.html
*/

/// <reference path="../iron-icon/iron-icon.d.ts" />

5 changes: 5 additions & 0 deletions gen-tsd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"util/**"
]
}
12 changes: 12 additions & 0 deletions hardware-icons.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* hardware-icons.html
*/

/// <reference path="../iron-icon/iron-icon.d.ts" />

12 changes: 12 additions & 0 deletions image-icons.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* image-icons.html
*/

/// <reference path="../iron-icon/iron-icon.d.ts" />

13 changes: 13 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* index.html
*/

/// <reference path="../webcomponentsjs/webcomponents-lite.d.ts" />
/// <reference path="../iron-component-page/iron-component-page.d.ts" />

42 changes: 42 additions & 0 deletions iron-icons.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* iron-icons.html
*/

/// <reference path="../iron-icon/iron-icon.d.ts" />

/**
* `iron-icons` is a utility import that includes the definition for the `iron-icon` element, `iron-iconset-svg` element, as well as an import for the default icon set.
*
* The `iron-icons` directory also includes imports for additional icon sets that can be loaded into your project.
*
* Example loading icon set:
*
* <link rel="import" href="../iron-icons/maps-icons.html">
*
* To use an icon from one of these sets, first prefix your `iron-icon` with the icon set name, followed by a colon, ":", and then the icon id.
*
* Example using the directions-bus icon from the maps icon set:
*
* <iron-icon icon="maps:directions-bus"></iron-icon>
*
* To load a subset of icons from one of the default `iron-icons` sets, you can
* use the [poly-icon](https://poly-icon.appspot.com/) tool. It allows you
* to select individual icons, and creates an iconset from them that you can
* use directly in your elements.
*
* See [iron-icon](#iron-icon) for more information about working with icons.
*
* See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for more information about how to create a custom iconset.
*/
interface IronIconsElement extends Polymer.Element {
}

interface HTMLElementTagNameMap {
"iron-icons": IronIconsElement;
}
12 changes: 12 additions & 0 deletions maps-icons.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* maps-icons.html
*/

/// <reference path="../iron-icon/iron-icon.d.ts" />

12 changes: 12 additions & 0 deletions notification-icons.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* notification-icons.html
*/

/// <reference path="../iron-icon/iron-icon.d.ts" />

Loading

0 comments on commit 3e6294c

Please sign in to comment.