Update documentation dependencies
parent
516a0a3c13
commit
a6e162ec9e
|
@ -32,7 +32,7 @@
|
||||||
"comma-style": [2, "last"],
|
"comma-style": [2, "last"],
|
||||||
"complexity": [0, 11],
|
"complexity": [0, 11],
|
||||||
"constructor-super": [2],
|
"constructor-super": [2],
|
||||||
"consistent-return": [2],
|
"consistent-return": [0],
|
||||||
"consistent-this": [0, "that"],
|
"consistent-this": [0, "that"],
|
||||||
"curly": [2, "multi-line"],
|
"curly": [2, "multi-line"],
|
||||||
"default-case": [2],
|
"default-case": [2],
|
||||||
|
@ -44,7 +44,6 @@
|
||||||
"func-names": [0],
|
"func-names": [0],
|
||||||
"func-style": [0, "declaration"],
|
"func-style": [0, "declaration"],
|
||||||
"generator-star-spacing": [2, "after"],
|
"generator-star-spacing": [2, "after"],
|
||||||
"strict": [2, "always"],
|
|
||||||
"guard-for-in": [0],
|
"guard-for-in": [0],
|
||||||
"handle-callback-err": [0],
|
"handle-callback-err": [0],
|
||||||
"key-spacing": [2, {
|
"key-spacing": [2, {
|
||||||
|
@ -79,7 +78,6 @@
|
||||||
"no-else-return": [0],
|
"no-else-return": [0],
|
||||||
"no-empty": [2],
|
"no-empty": [2],
|
||||||
"no-empty-character-class": [2],
|
"no-empty-character-class": [2],
|
||||||
"no-empty-label": [2],
|
|
||||||
"no-eq-null": [0],
|
"no-eq-null": [0],
|
||||||
"no-eval": [2],
|
"no-eval": [2],
|
||||||
"no-ex-assign": [2],
|
"no-ex-assign": [2],
|
||||||
|
@ -149,7 +147,9 @@
|
||||||
"no-undefined": [0],
|
"no-undefined": [0],
|
||||||
"no-underscore-dangle": [0],
|
"no-underscore-dangle": [0],
|
||||||
"no-unreachable": [2],
|
"no-unreachable": [2],
|
||||||
"no-unused-expressions": [2],
|
"no-unused-expressions": [2, {
|
||||||
|
"allowShortCircuit": true
|
||||||
|
}],
|
||||||
"no-unused-vars": [1, {
|
"no-unused-vars": [1, {
|
||||||
"vars": "all",
|
"vars": "all",
|
||||||
"args": "after-used"
|
"args": "after-used"
|
||||||
|
@ -164,23 +164,16 @@
|
||||||
"no-with": [2],
|
"no-with": [2],
|
||||||
"one-var": [0],
|
"one-var": [0],
|
||||||
"operator-assignment": [0, "always"],
|
"operator-assignment": [0, "always"],
|
||||||
"operator-linebreak": [2, "after"],
|
"operator-linebreak": [2, "before"],
|
||||||
"padded-blocks": [0],
|
"padded-blocks": [0],
|
||||||
"prefer-const": [2],
|
"prefer-const": [2],
|
||||||
"prefer-spread": [2],
|
"prefer-spread": [2],
|
||||||
"quote-props": [0],
|
"quote-props": [0],
|
||||||
"radix": [0],
|
"radix": [0],
|
||||||
"semi": [2],
|
"semi": [2],
|
||||||
"semi-spacing": [2, {
|
|
||||||
"before": false,
|
|
||||||
"after": true
|
|
||||||
}],
|
|
||||||
"sort-vars": [0],
|
"sort-vars": [0],
|
||||||
"space-after-keywords": [2, "always"],
|
"keyword-spacing": [2, {"after": true}],
|
||||||
"space-before-function-paren": [2, {
|
"space-before-function-paren": [2, { "anonymous": "always", "named": "always" }],
|
||||||
"anonymous": "always",
|
|
||||||
"named": "always"
|
|
||||||
}],
|
|
||||||
"space-before-blocks": [0, "always"],
|
"space-before-blocks": [0, "always"],
|
||||||
"space-in-brackets": [0, "never", {
|
"space-in-brackets": [0, "never", {
|
||||||
"singleValue": true,
|
"singleValue": true,
|
||||||
|
@ -192,7 +185,6 @@
|
||||||
}],
|
}],
|
||||||
"space-in-parens": [2, "never"],
|
"space-in-parens": [2, "never"],
|
||||||
"space-infix-ops": [2],
|
"space-infix-ops": [2],
|
||||||
"space-return-throw-case": [2],
|
|
||||||
"space-unary-ops": [2, {
|
"space-unary-ops": [2, {
|
||||||
"words": true,
|
"words": true,
|
||||||
"nonwords": false
|
"nonwords": false
|
||||||
|
@ -218,7 +210,7 @@
|
||||||
"react/jsx-no-duplicate-props": 1,
|
"react/jsx-no-duplicate-props": 1,
|
||||||
"react/jsx-no-undef": 1,
|
"react/jsx-no-undef": 1,
|
||||||
"react/jsx-pascal-case": 1,
|
"react/jsx-pascal-case": 1,
|
||||||
"react/jsx-sort-prop-types": 1,
|
"react/sort-prop-types": 1,
|
||||||
"react/jsx-sort-props": 0,
|
"react/jsx-sort-props": 0,
|
||||||
"react/jsx-uses-react": 1,
|
"react/jsx-uses-react": 1,
|
||||||
"react/jsx-uses-vars": 1,
|
"react/jsx-uses-vars": 1,
|
||||||
|
|
|
@ -81,7 +81,7 @@ const Home = () => (
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<footer className={style.footer}>
|
<footer className={style.footer}>
|
||||||
<p>React Toolbox © 2015</p>
|
<p>React Toolbox © 2016</p>
|
||||||
<small>Crafted with <span className={style.love}>ღ</span> between Spain and Thailand</small>
|
<small>Crafted with <span className={style.love}>ღ</span> between Spain and Thailand</small>
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
@ -1,53 +1,41 @@
|
||||||
import React from 'react';
|
import React, { PropTypes } from 'react';
|
||||||
import { History } from 'react-router';
|
|
||||||
import { List, ListItem } from 'react-toolbox';
|
import { List, ListItem } from 'react-toolbox';
|
||||||
|
import classnames from 'classnames';
|
||||||
import components from '../modules/components';
|
import components from '../modules/components';
|
||||||
import style from './navigation.scss';
|
import style from './navigation.scss';
|
||||||
|
|
||||||
const MainNavigation = React.createClass({
|
const MainNavigation = ({ className }, { router }) => {
|
||||||
propTypes: {
|
const drawerItems = Object.keys(components).map((key) => {
|
||||||
active: React.PropTypes.bool,
|
const isActive = router.isActive(components[key].path);
|
||||||
className: React.PropTypes.string
|
|
||||||
},
|
|
||||||
|
|
||||||
mixins: [History],
|
|
||||||
|
|
||||||
renderDrawerItems () {
|
|
||||||
return Object.keys(components).map((key) => {
|
|
||||||
const ToolboxComponent = components[key];
|
|
||||||
const to = this.context.history.createHref(ToolboxComponent.path);
|
|
||||||
let className = style.item;
|
|
||||||
if (this.context.history.isActive(ToolboxComponent.path)) {
|
|
||||||
className += ` ${style.active}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ListItem
|
|
||||||
key={key}
|
|
||||||
caption={ToolboxComponent.name}
|
|
||||||
className={className}
|
|
||||||
selectable
|
|
||||||
to={to}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
render () {
|
|
||||||
let className = style.root;
|
|
||||||
if (this.props.className) className += ` ${this.props.className}`;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<aside className={className}>
|
<ListItem
|
||||||
<List className={style.list} selectable ripple>
|
key={key}
|
||||||
{this.renderDrawerItems()}
|
caption={components[key].name}
|
||||||
</List>
|
className={classnames(style.item, { [style.active]: isActive })}
|
||||||
<footer className={style.footer}>
|
selectable
|
||||||
<span>React Toolbox © 2015</span>
|
onClick={() => { router.push(components[key].path);}}
|
||||||
</footer>
|
/>
|
||||||
</aside>
|
|
||||||
);
|
);
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
return (
|
||||||
|
<aside className={classnames(style.root, { [className]: className })}>
|
||||||
|
<List className={style.list} selectable ripple>
|
||||||
|
{drawerItems}
|
||||||
|
</List>
|
||||||
|
<footer className={style.footer}>
|
||||||
|
<span>React Toolbox © 2016</span>
|
||||||
|
</footer>
|
||||||
|
</aside>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
MainNavigation.propTypes = {
|
||||||
|
className: PropTypes.string
|
||||||
|
};
|
||||||
|
|
||||||
|
MainNavigation.contextTypes = {
|
||||||
|
router: PropTypes.object
|
||||||
|
};
|
||||||
|
|
||||||
export default MainNavigation;
|
export default MainNavigation;
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
a > span{
|
> span{
|
||||||
padding: $navigation-v-padding $navigation-h-padding;
|
padding: $navigation-v-padding $navigation-h-padding;
|
||||||
}
|
}
|
||||||
> span > span {
|
[data-react-toolbox="list-item-text"] {
|
||||||
font-size: $font-size-small;
|
font-size: $font-size-small;
|
||||||
font-weight: $font-weight-semi-bold;
|
font-weight: $font-weight-semi-bold;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,17 +9,15 @@ import BaseDocs from './modules/components.md';
|
||||||
import components from './modules/components.js';
|
import components from './modules/components.js';
|
||||||
import style from './style';
|
import style from './style';
|
||||||
|
|
||||||
const LoadExampleButton = (props) => {
|
const LoadExampleButton = (props) => (
|
||||||
return (
|
<Button
|
||||||
<Button
|
accent
|
||||||
raised
|
icon='code'
|
||||||
accent
|
label="Load in playground"
|
||||||
icon='code'
|
onClick={props.onClick}
|
||||||
label='Load in playground'
|
raised
|
||||||
onClick={props.onClick}
|
/>
|
||||||
/>
|
);
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
LoadExampleButton.propTypes = {
|
LoadExampleButton.propTypes = {
|
||||||
onClick: React.PropTypes.func
|
onClick: React.PropTypes.func
|
||||||
|
|
|
@ -63,8 +63,9 @@ $documentation-table-font-size: 1.4 * $unit;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
> button {
|
> button {
|
||||||
height: $documentation-playground-button-height;
|
height: $documentation-playground-button-height;
|
||||||
|
font-size: $documentation-playground-button-font-size;
|
||||||
|
line-height: $documentation-playground-button-height;
|
||||||
> span {
|
> span {
|
||||||
font-size: $documentation-playground-button-font-size;
|
|
||||||
line-height: $documentation-playground-button-height;
|
line-height: $documentation-playground-button-height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import { Router, Route, IndexRoute } from 'react-router';
|
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
|
||||||
|
|
||||||
import 'react-toolbox/commons';
|
import 'react-toolbox/commons';
|
||||||
import { App } from 'react-toolbox';
|
import { App } from 'react-toolbox';
|
||||||
import { createHashHistory } from 'history';
|
|
||||||
|
|
||||||
import Home from './components/layout/home';
|
import Home from './components/layout/home';
|
||||||
import Install from './components/layout/install';
|
import Install from './components/layout/install';
|
||||||
import Main from './components/layout/main';
|
import Main from './components/layout/main';
|
||||||
|
|
||||||
ReactDOM.render((
|
ReactDOM.render((
|
||||||
<Router history={createHashHistory({queryKey: false})}>
|
<Router history={browserHistory}>
|
||||||
<Route component={App}>
|
<Route component={App}>
|
||||||
<Route path="/" component={Home} />
|
<Route path="/" component={Home} />
|
||||||
<Route path="/install" component={Install} />
|
<Route path="/install" component={Install} />
|
||||||
|
|
|
@ -10,46 +10,46 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"babel-standalone": "^6.7.4",
|
"babel-standalone": "^6.7.4",
|
||||||
"classnames": "^2.2.1",
|
"classnames": "^2.2.3",
|
||||||
"codemirror": "^5.10.0",
|
"codemirror": "^5.10.0",
|
||||||
"history": "^1.17.0",
|
"history": "^2.0.1",
|
||||||
"react": "^0.14.3",
|
"react": "^15.0.1",
|
||||||
"react-dom": "^0.14.3",
|
"react-dom": "^15.0.1",
|
||||||
"react-router": "^1.0.0-rc3"
|
"react-router": "^2.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^6.2.1",
|
"autoprefixer": "^6.3.6",
|
||||||
"babel-core": "^6.3.26",
|
"babel-core": "^6.7.6",
|
||||||
"babel-eslint": "^5.0.0-beta4",
|
"babel-eslint": "^6.0.2",
|
||||||
"babel-loader": "^6.2.0",
|
"babel-loader": "^6.2.4",
|
||||||
"babel-plugin-react-transform": "^2.0.0-beta1",
|
"babel-plugin-react-transform": "^2.0.2",
|
||||||
"babel-preset-es2015": "^6.3.13",
|
"babel-preset-es2015": "^6.6.0",
|
||||||
"babel-preset-react": "^6.3.13",
|
"babel-preset-react": "^6.5.0",
|
||||||
"babel-preset-stage-0": "^6.3.13",
|
"babel-preset-stage-0": "^6.5.0",
|
||||||
"babel-preset-stage-2": "^6.3.13",
|
"babel-preset-stage-2": "^6.5.0",
|
||||||
"cross-env": "^1.0.5",
|
"cross-env": "^1.0.5",
|
||||||
"css-loader": "^0.23.1",
|
"css-loader": "^0.23.1",
|
||||||
"express": "^4.13.3",
|
"express": "^4.13.3",
|
||||||
"extract-text-webpack-plugin": "^0.9.1",
|
"extract-text-webpack-plugin": "^1.0.1",
|
||||||
"gh-pages": "^0.8.0",
|
"gh-pages": "^0.11.0",
|
||||||
"highlight-loader": "git://github.com/javivelasco/highlight-loader.git#master",
|
"highlight-loader": "git://github.com/javivelasco/highlight-loader.git#master",
|
||||||
"highlight.js": "^9.0.0",
|
"highlight.js": "^9.3.0",
|
||||||
"html-loader": "^0.4.0",
|
"html-loader": "^0.4.0",
|
||||||
"html-webpack-plugin": "^1.7.0",
|
"html-webpack-plugin": "^2.15.0",
|
||||||
"markdown-loader": "^0.1.7",
|
"markdown-loader": "^0.1.7",
|
||||||
"node-sass": "^3.4.2",
|
"node-sass": "^3.4.2",
|
||||||
"postcss-loader": "^0.8.0",
|
"postcss-loader": "^0.8.2",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
"react-transform-catch-errors": "^1.0.0",
|
"react-transform-catch-errors": "^1.0.2",
|
||||||
"react-transform-hmr": "^1.0.1",
|
"react-transform-hmr": "^1.0.1",
|
||||||
"redbox-react": "^1.2.0",
|
"redbox-react": "^1.2.3",
|
||||||
"sass-loader": "^3.1.2",
|
"sass-loader": "^3.2.0",
|
||||||
"style-loader": "^0.13.0",
|
"style-loader": "^0.13.1",
|
||||||
"toolbox-loader": "0.0.2",
|
"toolbox-loader": "0.0.2",
|
||||||
"transfer-webpack-plugin": "^0.1.4",
|
"transfer-webpack-plugin": "^0.1.4",
|
||||||
"webpack": "^1.12.9",
|
"webpack": "^1.12.14",
|
||||||
"webpack-dev-middleware": "^1.4.0",
|
"webpack-dev-middleware": "^1.6.1",
|
||||||
"webpack-hot-middleware": "^2.6.0"
|
"webpack-hot-middleware": "^2.10.0"
|
||||||
},
|
},
|
||||||
"repository": "github:react-toolbox/react-toolbox",
|
"repository": "github:react-toolbox/react-toolbox",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
|
|
|
@ -7,7 +7,7 @@ const app = express();
|
||||||
const compiler = webpack(config);
|
const compiler = webpack(config);
|
||||||
|
|
||||||
app.use(require('webpack-dev-middleware')(compiler, {
|
app.use(require('webpack-dev-middleware')(compiler, {
|
||||||
noInfo: true,
|
noInfo: true,
|
||||||
publicPath: config.output.publicPath,
|
publicPath: config.output.publicPath,
|
||||||
stats: {
|
stats: {
|
||||||
colors: true
|
colors: true
|
||||||
|
@ -17,14 +17,14 @@ app.use(require('webpack-dev-middleware')(compiler, {
|
||||||
app.use(require('webpack-hot-middleware')(compiler));
|
app.use(require('webpack-hot-middleware')(compiler));
|
||||||
|
|
||||||
app.get('*', function (req, res) {
|
app.get('*', function (req, res) {
|
||||||
res.sendFile(path.join(__dirname, './www/index.html'));
|
res.sendFile(path.join(__dirname, './www/index.html'));
|
||||||
});
|
});
|
||||||
|
|
||||||
app.listen(8081, '0.0.0.0', function (err) {
|
app.listen(8081, '0.0.0.0', function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Listening at http://0.0.0.0:8081');
|
console.log('Listening at http://0.0.0.0:8081');
|
||||||
});
|
});
|
||||||
|
|
|
@ -18,6 +18,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.jsx', '.scss', '.js', '.json', '.md'],
|
extensions: ['', '.jsx', '.scss', '.js', '.json', '.md'],
|
||||||
|
packageMains: ['browser', 'web', 'browserify', 'main', 'style'],
|
||||||
alias: {
|
alias: {
|
||||||
'react-toolbox': path.resolve(__dirname + './../components')
|
'react-toolbox': path.resolve(__dirname + './../components')
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,6 +14,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.jsx', '.scss', '.js', '.json', '.md'],
|
extensions: ['', '.jsx', '.scss', '.js', '.json', '.md'],
|
||||||
|
packageMains: ['browser', 'web', 'browserify', 'main', 'style'],
|
||||||
alias: {
|
alias: {
|
||||||
'react-toolbox': path.resolve(__dirname + './../components')
|
'react-toolbox': path.resolve(__dirname + './../components')
|
||||||
},
|
},
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<link rel="canonical" href="http://www.react-toolbox.com/">
|
<link rel="canonical" href="http://www.react-toolbox.com/">
|
||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="docs.css">
|
<link rel="stylesheet" href="/docs.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@ -44,6 +44,6 @@
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script src="docs.js"></script>
|
<script src="/docs.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
14
package.json
14
package.json
|
@ -73,11 +73,11 @@
|
||||||
"phantomjs": "^2.1.7",
|
"phantomjs": "^2.1.7",
|
||||||
"phantomjs-polyfill": "0.0.2",
|
"phantomjs-polyfill": "0.0.2",
|
||||||
"postcss-loader": "^0.8.2",
|
"postcss-loader": "^0.8.2",
|
||||||
"react": "^15.0.0",
|
"react": "^15.0.1",
|
||||||
"react-addons-css-transition-group": "^15.0.0",
|
"react-addons-css-transition-group": "^15.0.1",
|
||||||
"react-addons-test-utils": "^15.0.0",
|
"react-addons-test-utils": "^15.0.1",
|
||||||
"react-docgen": "^2.8.1",
|
"react-docgen": "^2.8.1",
|
||||||
"react-dom": "^15.0.0",
|
"react-dom": "^15.0.1",
|
||||||
"react-transform-catch-errors": "^1.0.0",
|
"react-transform-catch-errors": "^1.0.0",
|
||||||
"react-transform-hmr": "^1.0.4",
|
"react-transform-hmr": "^1.0.4",
|
||||||
"redbox-react": "^1.2.3",
|
"redbox-react": "^1.2.3",
|
||||||
|
@ -108,9 +108,9 @@
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"classnames": "^2.2.0",
|
"classnames": "^2.2.0",
|
||||||
"normalize.css": "^4.0.0",
|
"normalize.css": "^4.0.0",
|
||||||
"react": "^0.14 || ^15.0.0",
|
"react": "^0.14 || ^15.0.1",
|
||||||
"react-addons-css-transition-group": "^0.14.0 || ^15.0.0",
|
"react-addons-css-transition-group": "^0.14.0 || ^15.0.1",
|
||||||
"react-dom": "^0.14.0 || ^15.0.0"
|
"react-dom": "^0.14.0 || ^15.0.1"
|
||||||
},
|
},
|
||||||
"typings": "./react-toolbox.d.ts"
|
"typings": "./react-toolbox.d.ts"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue