Skip to content

Commit

Permalink
Fix #8 and improve coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
Takeharu Oshida committed May 6, 2016
1 parent dea46a0 commit e39bf95
Show file tree
Hide file tree
Showing 13 changed files with 566 additions and 246 deletions.
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": [
"es2015",
"stage-2",
"react"
]
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
example/**
node_modules/**
lib/**
karma.conf.js
14 changes: 7 additions & 7 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
# TODO use airbnb
"extends": "airbnb/base",
"env": {
"browser": true,
"node": true,
Expand All @@ -13,11 +15,10 @@
"react"
],
"rules": {
"comma-spacing": 1,
"key-spacing": 0,
"no-underscore-dangle": 0,
"no-unused-vars": [1, { "vars": "all", "args": "none" }],
"no-var": 2,
'max-len': [2, 160, 2, {
'ignoreUrls': true,
'ignoreComments': false
}],
"quotes": [1, "single", "avoid-escape"],
"react/display-name": 0,
"react/jsx-no-undef": 1,
Expand All @@ -30,6 +31,5 @@
"react/self-closing-comp": 1,
"react/wrap-multilines": 1,
"react/jsx-uses-vars": 1,
"strict": 1
}
}
}
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## Change Log

### Ver 0.0.4

+ #8 [Publish transpiled code](https://github.com/georgeOsdDev/react-dropfile-field/issues/8)
+ #10 [Update node modules](https://github.com/georgeOsdDev/react-dropfile-field/pull/10)

### Ver 0.0.3

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The MIT License (MIT)
Copyright (c) 2015 Takeharu.Oshida
Copyright (c) 2015 - 2016 Takeharu.Oshida

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
12 changes: 6 additions & 6 deletions example/app.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
'use strict';

import React from 'react';
import {Paper, TextField, Styles} from 'material-ui';
const ThemeManager = new Styles.ThemeManager();
import ReactDOM from 'react-dom';
import {Paper, TextField} from 'material-ui';
import getMuiTheme from 'material-ui/styles/getMuiTheme';

import DropfileField from '../lib/components/DropfileField';
import DropfileField from '../index.js';

//allow react dev tools work
window.React = React;
Expand All @@ -18,15 +19,14 @@ const iconClassNamesByExtension = {
'default': 'icon-file-text'
}


class App extends React.Component {
constructor(props) {
super(props);
}

getChildContext() {
return {
muiTheme: ThemeManager.getCurrentTheme()
muiTheme: getMuiTheme()
};
}

Expand Down Expand Up @@ -70,4 +70,4 @@ App.childContextTypes = {
muiTheme: React.PropTypes.object
};

React.render(<App/>, document.getElementById('out'));
ReactDOM.render(<App/>, document.getElementById('out'));
Loading

0 comments on commit e39bf95

Please sign in to comment.