diff --git a/.jshintrc b/.jshintrc index 37794fa..0598f66 100644 --- a/.jshintrc +++ b/.jshintrc @@ -5,6 +5,7 @@ "latedef": "nofunc", "newcap": false, "noarg": true, + "node": true, "nonew": true, "quotmark": "single", "undef": true, diff --git a/README.md b/README.md index d6838d9..3910268 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ $ bower install gaia-components/gaia-component ```js var MyComponent = component.register('my-component', { + // extend component from the given prototype + extends: HTMLButtonElement.prototype, + created: function() { // Creates a shadow-root and @@ -64,3 +67,9 @@ myComponent.customAttr; //=> 'foo'; If your would like tests to run on file change use: `$ npm run test-dev` + +## Lint check + +Run lint check with command: + +`$ npm run lint` diff --git a/bower.json b/bower.json index 0471e51..a8f2b6d 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "gaia-component", - "version": "0.3.6", + "version": "0.3.7", "authors": [ "Wilson Page " ], @@ -8,6 +8,8 @@ "license": "MIT", "ignore": [ "**/.*", + "README.md", + "package.json", "node_modules", "bower_components", "test", diff --git a/gaia-component.js b/gaia-component.js index 646566c..e3d1274 100644 --- a/gaia-component.js +++ b/gaia-component.js @@ -1,4 +1,3 @@ -/* jshint node:true */ /* globals define */ ;(function(define){'use strict';define(function(require,exports,module){ /** @@ -187,9 +186,9 @@ var defaultPrototype = createProto(HTMLElement.prototype, base.properties); * Returns a suitable prototype based * on the object passed. * + * @private * @param {HTMLElementPrototype|undefined} proto * @return {HTMLElementPrototype} - * @private */ function getBaseProto(proto) { if (!proto) { return defaultPrototype; } @@ -202,6 +201,7 @@ function getBaseProto(proto) { * Extends the given proto and mixes * in the given properties. * + * @private * @param {Object} proto * @param {Object} props * @return {Object} @@ -214,6 +214,7 @@ function createProto(proto, props) { * Detects presence of shadow-dom * CSS selectors. * + * @private * @return {Boolean} */ var hasShadowCSS = (function() { @@ -241,6 +242,7 @@ var regex = { * them to work from the