Skip to content

Commit

Permalink
Merge pull request #10 from gasolin/uppack
Browse files Browse the repository at this point in the history
refactor: update lint and package version
  • Loading branch information
wilsonpage committed May 8, 2015
2 parents da66d81 + 5becc90 commit b3bafc6
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 10 deletions.
1 change: 1 addition & 0 deletions .jshintrc
Expand Up @@ -5,6 +5,7 @@
"latedef": "nofunc",
"newcap": false,
"noarg": true,
"node": true,
"nonew": true,
"quotmark": "single",
"undef": true,
Expand Down
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -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
Expand Down Expand Up @@ -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`
4 changes: 3 additions & 1 deletion bower.json
@@ -1,13 +1,15 @@
{
"name": "gaia-component",
"version": "0.3.6",
"version": "0.3.7",
"authors": [
"Wilson Page <wilsonpage@me.com>"
],
"main": "gaia-component.js",
"license": "MIT",
"ignore": [
"**/.*",
"README.md",
"package.json",
"node_modules",
"bower_components",
"test",
Expand Down
9 changes: 7 additions & 2 deletions gaia-component.js
@@ -1,4 +1,3 @@
/* jshint node:true */
/* globals define */
;(function(define){'use strict';define(function(require,exports,module){
/**
Expand Down Expand Up @@ -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; }
Expand All @@ -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}
Expand All @@ -214,6 +214,7 @@ function createProto(proto, props) {
* Detects presence of shadow-dom
* CSS selectors.
*
* @private
* @return {Boolean}
*/
var hasShadowCSS = (function() {
Expand Down Expand Up @@ -241,6 +242,7 @@ var regex = {
* them to work from the <style scoped>
* injected at the root of the component.
*
* @private
* @return {String}
*/
function processCss(template, name) {
Expand Down Expand Up @@ -282,6 +284,7 @@ function processCss(template, name) {
* <style> in the head of the
* document.
*
* @private
* @param {String} css
*/
function injectGlobalCss(css) {
Expand Down Expand Up @@ -340,6 +343,7 @@ function injectLightCss(el) {
*
* toCamelCase('foo-bar'); //=> 'fooBar'
*
* @private
* @param {Sring} string
* @return {String}
*/
Expand Down Expand Up @@ -385,6 +389,7 @@ function addDirObserver() {
* source object `target` to a target object `source`.
* It will return the target object.
*
* @private
* @param {Object} target
* @param {Object} source
* @returns {Object}
Expand Down
6 changes: 3 additions & 3 deletions package.json
@@ -1,17 +1,17 @@
{
"name": "gaia-component",
"homepage": "https://github.com/gaia-components/gaia-component",
"version": "0.3.6",
"version": "0.3.7",
"main": "gaia-component.js",
"directories": {
"example": "examples",
"test": "test"
},
"devDependencies": {
"bower": "^1.4.1",
"browserify": "^9.0.8",
"browserify": "^10.1.0",
"jshint": "^2.7.0",
"karma": "^0.12.31",
"karma": "^0.12.32",
"karma-firefox-launcher": "^0.1.4",
"karma-mocha": "^0.1.10",
"karma-sinon-chai": "^0.3.0",
Expand Down
1 change: 0 additions & 1 deletion test/karma.conf.js
@@ -1,4 +1,3 @@
/* jshint node:true */
'use strict';
module.exports = function(config) {
config.set({
Expand Down
4 changes: 1 addition & 3 deletions test/test.js
@@ -1,6 +1,4 @@
/*global window,assert,suite,setup,teardown,sinon,test*/
/*jshint esnext:true*/

/*global sinon, assert, suite, setup, teardown, test */
suite('gaia-component', function() {
'use strict';

Expand Down

0 comments on commit b3bafc6

Please sign in to comment.